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

Optional incorrectly binds values from LHS in the RHS graph pattern #4882

Open
frensjan opened this issue Jan 26, 2024 · 0 comments
Open

Optional incorrectly binds values from LHS in the RHS graph pattern #4882

frensjan opened this issue Jan 26, 2024 · 0 comments
Labels
🐞 bug issue is a bug

Comments

@frensjan
Copy link
Contributor

frensjan commented Jan 26, 2024

Current Behavior

RDF4J incorrectly binds values from LHS of an OPTIONAL to variables in the RHS graph pattern.

See also w3c/sparql-dev#100 (comment)

Note that incorrectly may be nuanced. Different engines seem to implement this differently.

Expected Behavior / Steps To Reproduce

PREFIX : <http://example.org/>
                
SELECT * WHERE {
    VALUES ?x { :x }
    OPTIONAL {
        FILTER( BOUND(?x) )
        BIND( :y as ?y )
        BIND( ?x as ?z )
    }
}

should produce

---------------
| x  | y  | z |
===============
| :x | :y |   |
---------------

but produces

----------------
| x  | y  | z  |
===============
| :x | :y | :x |
----------------

Version

4.3.8

Are you interested in contributing a solution yourself?

Perhaps

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

1 participant