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

BIND with type errors result leads to cross joins instead of empty result #79

Closed
abrokenjester opened this issue May 11, 2016 · 1 comment
Labels
🐞 bug issue is a bug
Milestone

Comments

@abrokenjester
Copy link
Contributor

(Migrated from https://openrdf.atlassian.net/browse/SES-2250 )

When using a BIND variable in a pattern join, the result is a cross join of the dataset triple when the BIND expression raises a type error.

This query should expose the behavior on any store that contains blank nodes.
{code}
SELECT *
WHERE {
?s ?p ?o .
FILTER(isBlank(?o))
BIND (iri(?o) as ?s2)
?s2 ?p2 ?o2 .
} LIMIT 10
{code}

The join evaluation should normally conclude that both multisets are incompatible since ?s2 is unbound in the join's left argument so the query should normally return no result.

@abrokenjester abrokenjester added the 🐞 bug issue is a bug label May 11, 2016
@catch-point catch-point added this to the 2.2.2 milestone May 11, 2017
@catch-point catch-point modified the milestones: 2.2.3, 2.2.2 Jun 1, 2017
@catch-point
Copy link

To fix this we need to introduce a binding state that causes the variable to remain unbound in the solution. The spec says If the evaluation of the expression produces an error, the variable remains unbound for that solution but the query evaluation continues.

catch-point pushed a commit that referenced this issue Jul 24, 2017
Fix #79: Use null binding for unbound variable solutions
abrokenjester pushed a commit that referenced this issue Aug 22, 2019
abrokenjester pushed a commit that referenced this issue Aug 22, 2019
GH-73 remove explicit jsonld-java dependency
abrokenjester pushed a commit that referenced this issue Jul 25, 2020
documented mixed use of RDF4J Model objects and SparqlBuilder's own interfaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug issue is a bug
Projects
None yet
Development

No branches or pull requests

2 participants