-
Notifications
You must be signed in to change notification settings - Fork 19
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
Clarify that it's forbidden to "reassign" from BIND to SELECT #192
Comments
Update from https://phabricator.wikimedia.org/T235540, which shows that the form above is 100% forbidden.
Extra info:
I think the SPARQL conformance tests should include a check that SPARQL processors return 400 Bad Request for such requests. |
Agreed, this tripped us up when we moved from Blazegraph to Jena. Having
conformance tests and reports would be helpful for this and similar issues.
For instance, Jena does not reorder VALUES bindings, and will essentially
ignore end-of-query VALUES. That seems to be a conformance bug, but I'm not
sure if that's clear from the standard.
…On Fri, Sep 15, 2023 at 11:23 AM Vladimir Alexiev ***@***.***> wrote:
Update from https://phabricator.wikimedia.org/T235540, which shows that
the form above is 100% forbidden.
- https://www.w3.org/TR/sparql11-query/#aggregateExample: "It is an
error for aggregates to project variables with a name already used in other
aggregate projections, or in the WHERE clause."
- https://www.w3.org/TR/sparql11-query/#variableScope: "The variable v
must not be in-scope at the point of the (expr AS v) form."
Extra info:
- rdf4j/GraphDB allows rebinding
- Virtuoso (dbpedia) allows rebinding (see phabricator bug)
- Blazegraph allows it for certain situations:
- COUNT (see phabricator bug)
- SAMPLE (see phabricator bug)
- identity rebinding (see above)
- expression rebinding (not aggregate): but returns no rows
- Jena (http://sparql.org/sparql.html) returns proper "parse errors"
I think the SPARQL conformance tests should include a check that SPARQL
processors return 400 Bad Request for such requests.
—
Reply to this email directly, view it on GitHub
<#192 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAETCEJRUN3TP63O5CG7V4DX2RXG7ANCNFSM6AAAAAA4Z6ZAHE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Jamie McCusker (she/her/hers)
Director, Data Operations
Tetherless World Constellation
Rensselaer Polytechnic Institute
***@***.*** ***@***.***>
http://tw.rpi.edu
|
@jpmccu please create a bug report with your example(s) then. https://github.com/apache/jena/issues |
The SPARQL 1.1 test suite is maintained by volunteers at https://github.com/w3c/rdf-tests/
Please check the test suite. Negative syntax tests The SPARQL grammar section notes 12 and 13 apply at parse time. |
@namedgraph re @jpmccu : it's a lacking feature in Blazegraph (and GraphDB), not a bug in Jena. |
@afs thanks for your clarifications! |
I think the point is that if this were part of the conformance test, then
the GraphDB and Blazegraph folks would see it. They both use the rdf4j
package for parsing SPARQL and extend their engine, so this is also a
bigger issue than just them. They need to fix their bug, but if conformance
tests for things like this and other issues (like VALUES ordering for Jena)
were available, we would get better conformance from implementers without
having to report bugs, argue, etc.
…On Wed, Sep 27, 2023 at 7:38 AM Vladimir Alexiev ***@***.***> wrote:
@namedgraph <https://github.com/namedgraph> re @jpmccu
<https://github.com/jpmccu> : it's a lacking feature in Blazegraph (and
GraphDB), not a bug in Jena.
—
Reply to this email directly, view it on GitHub
<#192 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAETCEMTBOBHVQXVTXNIYPLX4QF5DANCNFSM6AAAAAA4Z6ZAHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Jamie McCusker (she/her/hers)
Director, Data Operations
Tetherless World Constellation
Rensselaer Polytechnic Institute
***@***.*** ***@***.***>
http://tw.rpi.edu
|
@jpmccu - They are available! See https://github.com/w3c/rdf-tests/ |
@jpmccu - Jena does reorder VALUES if semantically allowed. Please provide a test case or detailed example of what you expect and what actually happens. |
Odd, I can't replicate it with a simple query, it might have been a corner
case. I'll see if I can come across the original sometime. Sorry about that.
Jamie
…On Wed, Sep 27, 2023 at 12:07 PM Andy Seaborne ***@***.***> wrote:
@jpmccu <https://github.com/jpmccu> - Jena does reorder VALUES if
semantically allowed. Please provide a test case or detailed example of
what you expect and what actually happens.
—
Reply to this email directly, view it on GitHub
<#192 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAETCEINGBCZ44PPRHDIS63X4RFN7ANCNFSM6AAAAAA4Z6ZAHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Jamie McCusker (she/her/hers)
Director, Data Operations
Tetherless World Constellation
Rensselaer Polytechnic Institute
***@***.*** ***@***.***>
http://tw.rpi.edu
|
This query causes stack overflow on Blazegraph (see https://phabricator.wikimedia.org/T346420)
A similar query (see above link) returns useful results on GraphDB.
This query returns "No matching records found"
This query returns
foo=1
, no problem:So my question is: is it forbidden to "reassign" the same var from BIND to SELECT?
Reading through the spec:
So I'd say the spec is 99% clear that is forbidden, but not 100%.
The text was updated successfully, but these errors were encountered: