Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression in 1.6.4: unbound vars not filtered #469

Closed
mainej opened this issue May 1, 2024 · 1 comment
Closed

Regression in 1.6.4: unbound vars not filtered #469

mainej opened this issue May 1, 2024 · 1 comment

Comments

@mainej
Copy link

mainej commented May 1, 2024

While drafting #468, I noticed another regression. The two problems are quite likely related, but I'm submitting this one separately so I can explain it in isolation.

Consider the same query as in #468, but with the following edit to the or-join:

(or-join
 [?x ?y]
 (and [?x :parent ?z]
      [?z :parent ?y])
- [?y :parent ?x])
+ [?x :parent ?y])

In 1.6.3 this produces:

(["alice" #{[1 3] [1 2]}] 
 ["bob" #{[2 3]}]
 ["clara" #{}])

In 1.6.4 it produces:

(["alice" #{[1 3] [1 2]}]
 ["bob" #{[2 3]}] 
 ["clara" #{[3 nil]}])

It's very surprising to see a nil in the output of a query!

  • ❌ When the query is run for "clara", neither part of the or-join binds ?y. In 1.6.3 this would remove all tuples, but it seems that now ?y is bound to nil.
@tonsky tonsky closed this as completed in a4af151 May 3, 2024
@tonsky
Copy link
Owner

tonsky commented May 3, 2024

Hopefully fixed in 1.6.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants