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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b5e229585093009dd0f27fc13fb03f4c47800af504431125d6924cec518e5933
4
- data.tar.gz: b0f733fc1f6152715c679bbf023648837687f6c835e41163076b6d3840c7c4b2
3
+ metadata.gz: 566db205500299f766f3971b9692e876926ca5ff1f65fbfea78a8c19ed4c501d
4
+ data.tar.gz: 33c2890756ea8fba2d4dc28a877fcf21891a56783d63a996d5bf3c5cfde14033
5
5
  SHA512:
6
- metadata.gz: 1059e6c2ca73b04b25e5c820e57d1a6e4c37131079b864eccc6b5a5d55e31553ba53b2098d32c27588088c8b922eb8b98da1d59afe65129ba1437696832451c5
7
- data.tar.gz: 1b25987ebc1638fc745e8730ef6d9eb89468514466df59e6784e442996656aef54c1f8fbc5237ed78f81e1124018813b6ad9dbca4c3e9a553dab303f3137b04b
6
+ metadata.gz: 54316348e68e897854789e8a7dd3ac628fbab5b1c1b4e4fa877faff72ecbe42ebe2a589c77f31b2287af0c40dc03efd8da9467bba6eaa59466c4951cb9c6d638
7
+ data.tar.gz: aed6fcd142c56ef9f56a84b9efb00bab50a7b96090d9d4379653991dc387b6ae1d7249da5170389422d57ca683b4e9f853eb3549559d1e160db5583be8dcc2bc
data/Gemfile.lock CHANGED
@@ -9,7 +9,7 @@ GIT
9
9
  PATH
10
10
  remote: .
11
11
  specs:
12
- activecube (0.1.39)
12
+ activecube (0.1.40)
13
13
  activerecord (>= 5.2)
14
14
 
15
15
  GEM
@@ -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
- reduce_options = measures_by_tables.count==1 ? cube_query.options : []
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
@@ -1,3 +1,3 @@
1
1
  module Activecube
2
- VERSION = "0.1.40"
2
+ VERSION = "0.1.41"
3
3
  end
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.40
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-02-10 00:00:00.000000000 Z
11
+ date: 2022-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord