-
Notifications
You must be signed in to change notification settings - Fork 58
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
Blank Nodes in Graph Patterns #59
Comments
It's not clear exactly what restriction you're referring to. The link you provided shows the creation of a SPARQL CONSTRUCT using the supplied patterns. Is it that the serialization of a BNode element might render something which is not valid SPARQL? Do you have a specific example? Any BNodes generated automatically should be fine; those that are created by a client may fail on some servers, in which case the server may complain with a failure code, but that would seem to be just fine to me, as the client is in charge of creating such nodes. |
Sorry, I gave the wrong link. The restriction I intended to reference is this one:
When given patterns with blank nodes, the code linked in the original issue description creates queries like: CONSTRUCT { _:one _:two _:three . } WHERE { _:one _:two _:three . } Blazegraph (apparently correctly) rejects this. From a description of the behavior I sent them:
|
I don't think there are any official tests for this, and my implementation certainly doesn't raise an error. (Of course, BNodes in predicate locations are never okay). In the case of #query_pattern, we could simply fail if any element of the pattern is a BNode; arguably, the rdf-spec tests for Repository shouldn't use these patterns, as you generally can't remotely work with BNodes without skolemizing them. It only really works for in-memory Repositories, or those making a guarantee about BNode label stability (we're considering this for a hypothetical normalized dataset). |
I'm thinking this would be overkill. Something like The rest of what you've said rings true. The bnode handling I have in the Blazegraph work thus far is okay-ish, but carries some big caveats. I think there are solutions here without leaving the realm of SPARQL Update. |
Yes, I was thinking much the same ( |
I think they are semantically equivalent, with each constructing "fresh" blank nodes in In any case, there are two tests that fail with this error when run over Blazegraph, one can just be changed--I don't think it's intended to test anything to do with blank nodes--the other is:
I have a patch that uses a different node ID in |
@no-reply I'm assigning this to you to apply your patch. |
SPARQL::Client::Repository#query_pattern
runs afoul of a restriction in SPARQL about the allowed blank node labels in queries. I suspect most SPARQL implementations will just interpret these as two unique blank nodes without problem, but I noticed that Blazegraph throws errors and it seems technically correct to do so.We have the option to change the node labels within the method, here; better might be to find a place somewhere in
Pattern
to change the blank node labels so they won't be repeated.Thoughts?
The text was updated successfully, but these errors were encountered: