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

LATERAL: Unexpectedly unbound variable. #2896

Open
Aklakan opened this issue Dec 17, 2024 · 0 comments
Open

LATERAL: Unexpectedly unbound variable. #2896

Aklakan opened this issue Dec 17, 2024 · 0 comments
Labels

Comments

@Aklakan
Copy link
Contributor

Aklakan commented Dec 17, 2024

Version

5.3.0-SNAPSHOT

What happened?

I am not sure whether this is according to SEP7 or a bug in Jena:

I am trying to inject a value using lateral into a BIND in a subquery. The following works:

SELECT * {
  BIND('x' AS ?xIn)
  LATERAL {
    { SELECT * { BIND(?xIn AS ?xOut) } }
  }
}

The result is:

?xIn ?xOut
x x

However, if in the lateral block there is a Join, then it breaks:

SELECT * {
  BIND('x' AS ?xIn)
  LATERAL {
    BIND("foo" AS ?foo)
    { SELECT * { BIND(?xIn AS ?xOut) } }
  }
}

In the result, ?xOut is (for me) unexpectedly unbound.

?xIn ?foo ?xOut
x foo

I think this is a bug in Jena (but perhaps I am misunderstanding something about the scoping rules).

Relevant output and stacktrace

No response

Are you interested in making a pull request?

Maybe

@Aklakan Aklakan added the bug label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant