activecube 0.1.40 → 0.1.41
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/activecube/processor/composer.rb +1 -3
- data/lib/activecube/query/cube_query.rb +0 -30
- data/lib/activecube/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 566db205500299f766f3971b9692e876926ca5ff1f65fbfea78a8c19ed4c501d
|
4
|
+
data.tar.gz: 33c2890756ea8fba2d4dc28a877fcf21891a56783d63a996d5bf3c5cfde14033
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54316348e68e897854789e8a7dd3ac628fbab5b1c1b4e4fa877faff72ecbe42ebe2a589c77f31b2287af0c40dc03efd8da9467bba6eaa59466c4951cb9c6d638
|
7
|
+
data.tar.gz: aed6fcd142c56ef9f56a84b9efb00bab50a7b96090d9d4379653991dc387b6ae1d7249da5170389422d57ca683b4e9f853eb3549559d1e160db5583be8dcc2bc
|
data/Gemfile.lock
CHANGED
@@ -75,9 +75,7 @@ module Activecube::Processor
|
|
75
75
|
measures_by_tables = measure_tables.group_by(&:table)
|
76
76
|
measures_by_tables.each_pair do |table, list|
|
77
77
|
@models << table.model
|
78
|
-
|
79
|
-
reduced = cube_query.reduced list.map(&:measure), reduce_options
|
80
|
-
table_query = table.query reduced
|
78
|
+
table_query = table.query cube_query
|
81
79
|
composed_query = composed_query ? table.join(cube_query, composed_query, table_query) : table_query
|
82
80
|
end
|
83
81
|
composed_query
|
@@ -124,36 +124,6 @@ module Activecube::Query
|
|
124
124
|
(measures.map(&:selectors) + slices.map(&:selectors) + selectors).flatten.map(&:required_column_names).flatten.uniq
|
125
125
|
end
|
126
126
|
|
127
|
-
def reduced other_measures, other_options
|
128
|
-
|
129
|
-
common_selectors = []
|
130
|
-
other_measures.each_with_index do |m,i|
|
131
|
-
if i==0
|
132
|
-
common_selectors += m.selectors
|
133
|
-
else
|
134
|
-
common_selectors &= m.selectors
|
135
|
-
end
|
136
|
-
end
|
137
|
-
|
138
|
-
if common_selectors.empty?
|
139
|
-
reduced_measures = other_measures
|
140
|
-
reduced_selectors = self.selectors
|
141
|
-
else
|
142
|
-
reduced_measures = other_measures.collect{|m|
|
143
|
-
Measure.new m.cube, m.key, m.definition, (m.selectors - common_selectors), m.modifications
|
144
|
-
}
|
145
|
-
reduced_selectors = self.selectors + common_selectors
|
146
|
-
end
|
147
|
-
|
148
|
-
unless reduced_measures.detect{|rm| rm.selectors.empty? }
|
149
|
-
reduced_selectors += [Selector.or(reduced_measures.map(&:selectors).flatten.uniq)]
|
150
|
-
end
|
151
|
-
|
152
|
-
return self if (reduced_measures == self.measures) && (reduced_selectors == self.selectors)
|
153
|
-
|
154
|
-
CubeQuery.new cube, slices, reduced_measures, reduced_selectors, other_options, tables
|
155
|
-
end
|
156
|
-
|
157
127
|
def join_fields
|
158
128
|
slices.map(&:group_by_columns).flatten.uniq
|
159
129
|
end
|
data/lib/activecube/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activecube
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.41
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aleksey Studnev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|