-
Notifications
You must be signed in to change notification settings - Fork 2
GH-284: Align TRIPLE and expression <<( )>> #285
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides this (what I assume to be a) typo, LGTM.
spec/index.html
Outdated
<a href="#constructGraph">CONSTRUCT</a> query form | ||
allows <a data-cite="RDF12-CONCEPTS#dfn-rdf-triple">RDF triples</a>, and not | ||
their germalization to | ||
<a data-cite="RDF12-CONCEPTS#dfn-symmetric-rdf-triple">symmetric RDF triples</a>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe state that the generalized triples are discarded by CONSTRUCT? The sentence sounded a bit weird to me, stating the issue but not telling what is the expected behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are overlooking one problem, symmetric triple term have impact on output outside of CONSTRUCT. What is the result of the following query?
PREFIX ex: <http://example.com/> .
SELECT (<<( "1" ex:equal "1" )>> AS ?t) {}
it is a single solution with the symmetric triple term <<( "1" ex:equal "1" )>>
or is it no solution?
I see three way forward here:
- return the symmetric triple term. It means allowing symmetric triple term in SPARQL output formats. Hence, they do not contain only valid RDF terms anymore...
- do not return the invalid RDF triple term but keep it in internal solutions. But it means now that SELECT removes some tuples used internally, leading to impact on subqueries, unexpected behaviors for the users...
- not merge this MR and prevent symmetric triple term to be included in solutions. This is the status quo.
I tend to prefer option 3, it avoids regrettable consequences and allow us to change our mind in a future version of SPARQL. It seems like the "safe" choice.
Co-authored-by: Ruben Taelman <rubensworks@users.noreply.github.com>
@Tpt You raise a very good point. However, I think we can still merge this PR by tweaking the text a bit. |
I also prefer the current definition as the safer approach (i.e., not the definition in this PR). |
"Symmetric RDF" is not RDF, and must not be represented as if it were. Else, users will try to load exports/dumps of Symmetric RDF into (non-Symmetric) RDF stores, with predictable failure to find all their triples in place upon completion and/or errors along the way. Similarly, users who become accustomed to working with Symmetric RDF will run into all sorts of walls when using (non-Symmetric) RDF tools. Especially there will be new issues arising when trying to use Federated SPARQL with any combination of SPARQL engines supporting Symmetric RDF and (non-Symmetric) RDF. I am not 100% -1, lie down in the road, on permitting RDF store and SPARQL engine vendors to build in switches that allow Symmetric RDF to be loaded and/or queried and/or output, but there must be a way to trumpet that they are acting in such fashion, to minimize the issues that arise down the road. Perhaps new media types are warranted. |
@TallTed 's concerns are obviously not something specific to the SPARQL folks here, but more generally for the WG at large. Now, in this sense, didn't we already have a vote against symmetric RDF as the way RDF 1.2 will be? |
This closes #284.
Discussion: #283 (comment)
Make writing
<<( ... )>>
the same as usingTRIPLE
with the same arguments.(The inverse is not permitted by the grammar -
TRIPLE
can have expressions, but expressions are not allowed in<<( ... )>>
because there are no comma separators.)Preview | Diff