bmg 0.24.0 → 0.24.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 +4 -4
- data/lib/bmg/sql/processor/join.rb +15 -1
- data/lib/bmg/version.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ff9e5fa48bb225feaeee07ddbfb15f8616e7943be2304113d727d7b8fd71dda2
|
|
4
|
+
data.tar.gz: b8924512fc6e1b4d8cdb6d86ab40e5e5f317850839ae6d8bc3f02ddd8534e578
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dc7c8dde953a4792a17177abe5a3decd4a3aac156cda87c7ad8854382d2248b03a272a6d318a348fbcba255ba5302e5adbaa4f3764c6db04b61924e9d11e50f4
|
|
7
|
+
data.tar.gz: 5148e32c981959c62eedae0f8b15cd8816d9afc01f7e1e00e94cc4d7086892e22dc4b6da0a3bb07a57ec138e91060b3c2a839c9f6e4ef5b6af053df08382c20e
|
|
@@ -15,7 +15,7 @@ module Bmg
|
|
|
15
15
|
def call(sexpr)
|
|
16
16
|
if unjoinable?(sexpr)
|
|
17
17
|
call(builder.from_self(sexpr))
|
|
18
|
-
elsif unjoinable?(right)
|
|
18
|
+
elsif unjoinable?(right) || left_join_over_restricted_right?
|
|
19
19
|
Join.new(builder.from_self(right), on, options, builder).call(sexpr)
|
|
20
20
|
else
|
|
21
21
|
super(sexpr)
|
|
@@ -37,6 +37,20 @@ module Bmg
|
|
|
37
37
|
sexpr.set_operator? or sexpr.limit_or_offset? or sexpr.group_by?
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
+
# A restriction carried by the right operand of a left join may not be
|
|
41
|
+
# merged into the WHERE of the whole expression: there it would also
|
|
42
|
+
# have to hold of the tuples the left join fills with nulls, which is an
|
|
43
|
+
# inner join and loses exactly what the left join is for. Kept inside a
|
|
44
|
+
# derived table instead, where it applies to the right operand alone.
|
|
45
|
+
#
|
|
46
|
+
# The join condition would hold it just as well, and with less SQL, but
|
|
47
|
+
# it is the one place a restriction may be anything -- `>`, `IN`, a
|
|
48
|
+
# negation -- while the from clause orderer models a join condition as
|
|
49
|
+
# equalities between two qualified names.
|
|
50
|
+
def left_join_over_restricted_right?
|
|
51
|
+
left_join? && !right.select_exp.predicate.nil?
|
|
52
|
+
end
|
|
53
|
+
|
|
40
54
|
def join_set_quantifiers(left, right)
|
|
41
55
|
left_q, right_q = left.set_quantifier, right.set_quantifier
|
|
42
56
|
left_q == right_q ? left_q : builder.distinct
|
data/lib/bmg/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bmg
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.24.
|
|
4
|
+
version: 0.24.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bernard Lambeau
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
10
|
+
date: 2026-10-03 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: predicate
|
|
@@ -333,7 +332,6 @@ homepage: http://github.com/enspirit/bmg
|
|
|
333
332
|
licenses:
|
|
334
333
|
- MIT
|
|
335
334
|
metadata: {}
|
|
336
|
-
post_install_message:
|
|
337
335
|
rdoc_options: []
|
|
338
336
|
require_paths:
|
|
339
337
|
- lib
|
|
@@ -348,8 +346,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
348
346
|
- !ruby/object:Gem::Version
|
|
349
347
|
version: '0'
|
|
350
348
|
requirements: []
|
|
351
|
-
rubygems_version: 3.
|
|
352
|
-
signing_key:
|
|
349
|
+
rubygems_version: 3.6.2
|
|
353
350
|
specification_version: 4
|
|
354
351
|
summary: Bmg is Alf's successor.
|
|
355
352
|
test_files: []
|