-
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
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
Should the definition of the evaluation of "graph" mention blank nodes?
It isn't necessary because they come in via variables but:
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: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?
I am not sure what you mean by this comment.
Uh oh!
There was an error while loading. Please reload this page.
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.
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"
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.)
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
Now I understand your concern! I had a proposal related to that already in my previous comment: We may extend this line of the algorithm as follows.
"foreach graph name gn in D (recall that a graph name may be an IRI or a blank node)"
I think that should address your concern. Do you agree?
Right.
Do you think my proposal for the previous point addresses this one as well? Otherwise, what else would you propose to do here?
Uh oh!
There was an error while loading. Please reload this page.
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.
Picking up on @afs suggestion above...
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 I have now pushed a commit (ad44a8b) with the change proposed above, extending the
"foreach graph name gn in D"
line of the algorithm to
"foreach graph name gn in D (recall that a graph name may be an IRI or a blank node)"
Does this address your concerns? Or do you still think it is better to extend the Graph operator such that its first argument can not only be an IRI or a variable but also a blank node? (I would still find that confusing because that deviates from the user syntax)
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 are you still planning to review this PR? Otherwise, I will merge it. It has approvals from all the other editors.
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.
Just noting that
GRAPH _:blank
(if it were legal) is always empty. Blank nodes treatment as non-distinguished variables happens in BGPs.