bmg 0.23.0 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 542c4218634ee7ae5b224400ee07ec6d2998473a
4
- data.tar.gz: 37eddfc05f9fcfca90e96c50fc6628a09cdf8742
3
+ metadata.gz: f4e96e3e62ddc057b324fa79c7d248ce423dc396
4
+ data.tar.gz: 3f5ac0d49fa5e6c5449a67a14c3f2e13b2b4cae7
5
5
  SHA512:
6
- metadata.gz: 9c5009a14fa10be21fc6d76e23fb47a8e0e69e9dd300478822c6bc9758230ff593cb0a3783b94b0a64c4afbd82456b362ee081a02e4a049c65759c9699a3f074
7
- data.tar.gz: 5d73d4dad1eb72f3794cbcfddab422e01a197d9c128f6991243cf7d381e41f9ae0cf255f03aff5eb23ac3d4375de1da1345503e086ff01253dd6e636497727b4
6
+ metadata.gz: 49a504176009211d654fa88e8a8239d3f515ded7e557b73f56b83e69b92ef535d315245d0dfe4276e6914ccc5668c53d857cb8ae59f2510eead17fb5bcda7964
7
+ data.tar.gz: 4e4863368f8f21be2711b08a3f1682e954759940e22207fd843bb8c158884728e5eb1269643c33b4bd5790dce9a9de72be8a16080832d18001eb4a41c79ac0b2
@@ -20,6 +20,26 @@ module Bmg
20
20
 
21
21
  attr_reader :by, :summarization
22
22
 
23
+ protected # optimization
24
+
25
+ def _restrict(type, predicate)
26
+ return super unless type.knows_attrlist?
27
+
28
+ # bottom only uses attributes of the `by` list
29
+ # and can be pushed down the tree
30
+ summaries = type.attrlist - by
31
+ top, bottom = predicate.and_split(summaries)
32
+ if top == predicate
33
+ super
34
+ else
35
+ op = operand
36
+ op = op.restrict(bottom)
37
+ op = op.summarize(by, summarization)
38
+ op = op.restrict(top)
39
+ op
40
+ end
41
+ end
42
+
23
43
  public
24
44
 
25
45
  def each
data/lib/bmg/version.rb CHANGED
@@ -2,7 +2,7 @@ module Bmg
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 23
5
- TINY = 0
5
+ TINY = 1
6
6
  end
7
7
  VERSION = "#{Version::MAJOR}.#{Version::MINOR}.#{Version::TINY}"
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bmg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.0
4
+ version: 0.23.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernard Lambeau