-
Notifications
You must be signed in to change notification settings - Fork 2
Consider bnode graph names in evaluation of Graph #221
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
the result is <var>R</var> | ||
</pre> | ||
<p>For every |x| that is | ||
an <a data-cite="RDF12-CONCEPTS#dfn-IRI">IRI</a> or |
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.
an <a data-cite="RDF12-CONCEPTS#dfn-IRI">IRI</a> or | |
an <a data-cite="RDF12-CONCEPTS#dfn-IRI">IRI</a>, | |
a <a data-cite="RDF12-CONCEPTS#dfn-blank-node">blank node</a> or |
Should the definition of the evaluation of "graph" mention blank nodes?
It isn't necessary because they come in via variables but:
- It more clearly indicates that literal and triple terms can not be used
- The intuition of variable substitution applies
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.
@afs your edit suggestion is incorrect. The x in Graph(x, P) may indeed be only an IRI or a variable; not a blank node. While the algebraic syntax is not explicitly defined in the spec, it is clear from the grammar of the user-facing syntax that there can be no blank node---see the GraphGraphPattern
production:
[62] GraphGraphPattern ::= 'GRAPH' VarOrIri GroupGraphPattern
Should the definition of the evaluation of "graph" mention blank nodes?
It isn't necessary because they come in via variables but:
- It more clearly indicates that literal and triple terms can not be used
Cannot be used for what exactly?
If you mean that they cannot be used as the x in the new version of this definition, I think stating that x may be an IRI or a variable (as done in this PR) is sufficient.
If you mean that they cannot be used as bindings for the variable x (in case x is a variable), I don't think that saying something like this belongs in this definition; maybe better suited for the informal text in Section 13.3 Querying the Dataset. Also, it is not entirely correct to say that literals and term maps cannot be assigned to variable x in incoming solution mappings; such solution mappings would just not survive the Join within the foreach loop. Perhaps one thing to make this more obvious would be to extend the foreach-line of the algorithm from (current form)
foreach graph name gn in D
to
foreach graph name gn in D (recall that a graph name may be an IRI or a blank node)
Would that address your concern?
- The intuition of variable substitution applies
I am not sure what you mean by this comment.
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.
- It more clearly indicates that literal and triple terms can not be used
Cannot be used for what exactly?
As graph names.
It does not cause any harm to be a little bit more general here.
The 1.1 text says "foreach IRI i in D"; the new text puts in a link so the cue isn't there.
"foreach graph name gn in D"
- The intuition of variable substitution applies
I am not sure what you mean by this comment.
In TriG, GRAPH _:label { ... }
is legal so one can think of the query as a trig pattern, like BGPs are turtle patterns.
The variable may, visually, be defined in the query close-by.
(Yes, this actually happens when the "graph" evaluation is joined with the rest of the group graph pattern.)
This PR addresses #217 by extending the definition of how to evaluate GRAPH patterns such that it now also considers blank nodes as possible graph names in an RDF dataset.
Additionally, the PR:
Preview | Diff