-
Notifications
You must be signed in to change notification settings - Fork 165
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
SPARQL: Variables from outside group are visible inside group #1405
Comments
Can you give an example query with an optional pattern that shows this issue? Reason I ask is that first glance the issue appears to be specific to how BIND is processed, but I may be overlooking something. |
What I meant is, it's not just group graph patterns that are affected, but if the second group was replaced by, say, It may well be specific to |
GH-1405 query planner uses hashjoin when scoped group pattern
I have just realized that this fix is incomplete: while all the mechanics are put in place, the query planner doesn't actually use the new logic to determine what join strategy to use. 🤦♂️ That'll teach me for adding a fix without a regression test. |
use merge-join for group patterns to handle scope, with special case exception for FILTER (NOT) EXISTS
The following query's query pattern has two group graph patterns:
According to the SPARQL spec, the result of the query is defined as the result of evaluating each group independently, and then joining the results:
?a
bound to"a"
.?a
is not bound within the group, so theBIND
leaves?b
unbound.?a
bound to"a"
.In RDF4J, however, the query returns a single solution with both
?a
and?b
bound to"a"
. This is incorrect.Similar problems exists for other language constructs. For example, changing the second group to an
OPTIONAL
shows the same problem. But changing it to a subquery does not.The text was updated successfully, but these errors were encountered: