quandl_cassandra 0.3.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/UPGRADE.md +6 -0
- data/lib/quandl/cassandra.rb +0 -7
- data/lib/quandl/cassandra/version.rb +1 -1
- data/spec/lib/quandl/cassandra/base/scoping_spec.rb +10 -10
- metadata +1 -61
- data/lib/quandl/cassandra_models/column.rb +0 -20
- data/lib/quandl/cassandra_models/column/read.rb +0 -32
- data/lib/quandl/cassandra_models/column/read/collapse.rb +0 -65
- data/lib/quandl/cassandra_models/column/read/column.rb +0 -19
- data/lib/quandl/cassandra_models/column/read/data.rb +0 -59
- data/lib/quandl/cassandra_models/column/read/offset.rb +0 -118
- data/lib/quandl/cassandra_models/column/read/row.rb +0 -20
- data/lib/quandl/cassandra_models/column/read/select_columns.rb +0 -60
- data/lib/quandl/cassandra_models/column/read/transform.rb +0 -53
- data/lib/quandl/cassandra_models/column/read/type.rb +0 -25
- data/lib/quandl/cassandra_models/column/write.rb +0 -22
- data/lib/quandl/cassandra_models/column/write/group_data_by_column.rb +0 -37
- data/lib/quandl/cassandra_models/column/write/group_data_by_frequency.rb +0 -24
- data/lib/quandl/cassandra_models/column/write/insert_column_attributes.rb +0 -20
- data/lib/quandl/cassandra_models/column/write/insert_columns.rb +0 -9
- data/lib/quandl/cassandra_models/column_attribute.rb +0 -11
- data/lib/quandl/cassandra_models/data.rb +0 -18
- data/lib/quandl/cassandra_models/data/search.rb +0 -104
- data/lib/quandl/cassandra_models/dataset.rb +0 -72
- data/lib/quandl/cassandra_models/dataset/columns.rb +0 -61
- data/lib/quandl/cassandra_models/dataset_attribute.rb +0 -6
- data/lib/quandl/cassandra_models/multiset.rb +0 -50
- data/spec/factories/dataset.rb +0 -8
- data/spec/lib/quandl/cassandra_models/column/write/group_data_by_frequency_spec.rb +0 -28
- data/spec/lib/quandl/cassandra_models/column/write_spec.rb +0 -23
- data/spec/lib/quandl/cassandra_models/column_attribute_spec.rb +0 -16
- data/spec/lib/quandl/cassandra_models/column_spec.rb +0 -17
- data/spec/lib/quandl/cassandra_models/data_spec.rb +0 -84
- data/spec/lib/quandl/cassandra_models/dataset/collapse_spec.rb +0 -44
- data/spec/lib/quandl/cassandra_models/dataset/column_spec.rb +0 -24
- data/spec/lib/quandl/cassandra_models/dataset/persistence_spec.rb +0 -24
- data/spec/lib/quandl/cassandra_models/dataset/row_spec.rb +0 -26
- data/spec/lib/quandl/cassandra_models/dataset/transform_spec.rb +0 -16
- data/spec/lib/quandl/cassandra_models/dataset/trim_spec.rb +0 -74
- data/spec/lib/quandl/cassandra_models/dataset/update_spec.rb +0 -37
- data/spec/lib/quandl/cassandra_models/dataset_attribute_spec.rb +0 -18
- data/spec/lib/quandl/cassandra_models/dataset_spec.rb +0 -111
- data/spec/lib/quandl/cassandra_models/multiset/collapse_spec.rb +0 -122
- data/spec/lib/quandl/cassandra_models/multiset/columns_spec.rb +0 -57
- data/spec/lib/quandl/cassandra_models/multiset/data_spec.rb +0 -25
- data/spec/lib/quandl/cassandra_models/multiset/transform_spec.rb +0 -69
@@ -1,69 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
require 'spec_helper'
|
3
|
-
|
4
|
-
describe Multiset do
|
5
|
-
|
6
|
-
context "transform" do
|
7
|
-
|
8
|
-
let(:d1){ create(:dataset) }
|
9
|
-
let(:d2){ create(:dataset) }
|
10
|
-
subject { Multiset.with_columns("#{d2.id.to_i}.1,#{d1.id.to_i}.1,#{d2.id.to_i}.3,#{d1.id.to_i}.2") }
|
11
|
-
|
12
|
-
let(:data_table){ subject.data.scoped.to_table }
|
13
|
-
|
14
|
-
it "should change the scope" do
|
15
|
-
scope = subject.data.transform('rdiff')
|
16
|
-
scope.attributes[:transform].should eq :rdiff
|
17
|
-
end
|
18
|
-
|
19
|
-
it "should default" do
|
20
|
-
subject.data.should_not eq data_table.transform(:rdiff).sort_descending!
|
21
|
-
end
|
22
|
-
|
23
|
-
it "should rdiff" do
|
24
|
-
subject.data.transform(:rdiff).should eq data_table.transform(:rdiff).sort_descending!
|
25
|
-
end
|
26
|
-
|
27
|
-
it "should diff" do
|
28
|
-
subject.data.transform(:diff).should eq data_table.transform(:diff).sort_descending!
|
29
|
-
end
|
30
|
-
|
31
|
-
it "should cumul" do
|
32
|
-
subject.data.transform(:cumul).should eq data_table.transform(:cumul).sort_descending!
|
33
|
-
end
|
34
|
-
|
35
|
-
it "should rdiff_from" do
|
36
|
-
subject.data.transform(:rdiff_from).should eq data_table.transform(:rdiff_from).sort_descending!
|
37
|
-
end
|
38
|
-
|
39
|
-
context "row" do
|
40
|
-
|
41
|
-
it "should rdiff" do
|
42
|
-
subject.data.transform(:rdiff).row(10)[0].should eq data_table.transform(:rdiff).sort_descending![10]
|
43
|
-
end
|
44
|
-
|
45
|
-
it "should cumul" do
|
46
|
-
subject.data.transform(:cumul).row(10)[0].should eq data_table.transform(:cumul).sort_descending![10]
|
47
|
-
end
|
48
|
-
|
49
|
-
it "should rdiff_from" do
|
50
|
-
subject.data.transform(:rdiff_from).row(10)[0].should eq data_table.transform(:rdiff_from).sort_descending![10]
|
51
|
-
end
|
52
|
-
|
53
|
-
end
|
54
|
-
|
55
|
-
context "offset" do
|
56
|
-
|
57
|
-
it "should rdiff" do
|
58
|
-
subject.data.transform(:rdiff).offset(10).limit(10).to_a.should eq data_table.transform(:rdiff).sort_descending![10..19]
|
59
|
-
end
|
60
|
-
|
61
|
-
it "should cumul" do
|
62
|
-
subject.data.transform(:cumul).offset(10).limit(10).to_a.should eq data_table.transform(:cumul).sort_descending![10..19]
|
63
|
-
end
|
64
|
-
|
65
|
-
end
|
66
|
-
|
67
|
-
end
|
68
|
-
|
69
|
-
end
|