-
Notifications
You must be signed in to change notification settings - Fork 23
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
Update data-r2 to be SPARQL 1.1 compatible #83
Conversation
I think a change to |
Reader: syntax-esc-05 is PREFIX : <http://example/>
SELECT *
# Comments can contain \ u
# <\u0078> :\u0070 ?xx\u0078
WHERE { <\u0078> :\u0070 ?xx\u0078 } I'm not seeing an error with SPARQL 1.1 on those tests. They do, however, trigger errors with the community position on \ u to be processed after parsing, in strings and IRIs, and nowhere else. That's the Turtle rules. and @gkellogg comment #67 (comment) Both the prefixed name and the variable lead to bad syntax by the community processing rule. For the SPARQL rdf-tests, I think we should have a conservative "latest agreed" test suite. I've created #84 for a general discussion and a reorganisation of the SPARQL tests to help implementers find the current tests. The new RDF-Star WG makes it a good time for that because it is also chartered for errata. |
Added a commit that makes syntax-esc-04 and syntax-esc-05 work for SPARQL 1.0, SPARQL 1.1 and the community consensus. |
These all look good to me (but, eventually I need to better understand variable visibility as indicated by |
Happy to discuss that test case ... where's good? The difference is when simplification is applied. It matters for OPTIONAL because OPTIONAL { ... FILTER(...) } puts the filter into the LeftJoin expressions. In LeftJoin, the FILTER can see the left-hand-side variables. (SQL: For OPTIONAL { { ... FILTER(...) } }, the inner part is if simplify happens while coming back up the tree generating algebra operations, it removes the join i.e. the inner of if simplification happens as a step after the whole algebra is converted, this does not happen. Compiling the OPTIONAL see a join and the filter is not at the top level of the OPTIONAl block and so not handled in the LeftJoin. Use case:
Hindsight: a better syntax would be call out if the filter needed access to the LHS.
But we are where we are. (a "no conditions on LeftJoin" approach would mean users having to duplicate parts of their query - possibly quite large parts.) |
This PR changes data-r2/ in place, no directory rename applied, for discussion of the changes needed.
This is why it is marked "draft".
This PR does not include PR #82 which is needed as well for the SPARQL 1.0 test suite to run.
Changes and reason:
dawg-optional-filter-005-simplified (expr-5.rq)
Only one of
expr-5-result-simplified.ttl
andexpr-5-result-not-simplified.ttl
can be right.There was an mmbiguity in the SPARQL 1.0 spec.
expr-5-result-not-simplified.ttl
is the preferred answer (simplify after all algebra generated, not as generated).Also reformatted
optional-filter/manifest.ttl
datatype-2 : Literals with a datatype (q-datatype-2.rq)
@lang
has a datatype in RDF 1.1Update:
expr-builtin/result-datatype-2.srx
Strings: Distinct (distinct-1.rq)
RDF 1.1 "" is now the same as ""^^xsd:string
Updated
distinct-str.srx
All: Distinct (distinct-1.rq)
Same.
"" is now ""^^xsd:string
Update
distinct-all.srx
syntax-lit-08.rq (syntax-lit-08.rq)
Decimal form change.
Updated:
syntax-sparql1/syntax-lit-08.rq