File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 133133 (= attrs-a attrs-b)
134134 (Relation. attrs-a (into (vec tuples-a) tuples-b))
135135
136- (not (same-keys? attrs-a attrs-b))
136+ (and (not (same-keys? attrs-a attrs-b))
137+ (seq tuples-a) ; could be empty because
138+ (seq tuples-b)) ; a query short-circuited
137139 (raise " Can’t sum relations with different attrs: " attrs-a " and " attrs-b
138140 {:error :query/where })
139141
Original file line number Diff line number Diff line change 8181 (or-join [?e]
8282 (and [?e :age ?a]
8383 [?e2 :age ?a]))]
84- #{1 2 3 4 5 6 })
84+ #{1 2 3 4 5 6 }
85+
86+ [(or-join [?e ?n]
87+ (and [?e :age 30 ] ; no matches, so this branch short-circuits
88+ [?e :name ?n])
89+ (and [?e :age 20 ]
90+ [?e :name ?n]))
91+ [(ground " Ivan" ) ?n]]
92+ #{2 6 }
93+
94+ [(or
95+ (and [?e :age 30 ] ; no matches, so this branch short-circuits
96+ [?e :name ?n])
97+ (and [?e :age 20 ]
98+ [?e :name ?n]))
99+ [(ground " Ivan" ) ?n]]
100+ #{2 6 })
85101
86102 ; ; #348
87103 (is (= #{[1 ] [3 ] [4 ] [5 ]}
184200 (d/q '[:find ?e
185201 :where (or-join [[?e]]
186202 [?e :name " Ivan" ])]
187- @test-db))))
203+ @test-db))))
You can’t perform that action at this time.
0 commit comments