-
Notifications
You must be signed in to change notification settings - Fork 0
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
Querying nested quoted triples at an unknown depth #96
Comments
Your observation is right. I am afraid, however, that trying to add such a functionality is a rabbit hole. Assuming we would define support for your particular example, someone may come along and want the same but with a restriction to specific subjects of quoted triples along the way, or concatenations of predicates (e.g., |
I guarantee real-world scenarios where someone will want (need) to query for all occurrences of Such results would allow such a querent to adjust their confidence in assertions made by asserters who (in)accurately (as judged by this querent) describe |
Eventually, there should be entailments which flatten a graph with recursive quoted triples to being only asserted triples, at which point it would be available to a pattern such as |
I agree that we probably won't be able to provide all possible request functionalities, If the WG agrees that this is not a direction we want to go into, then I can definitely live with that. An alternative approach that is inspired by the SELECT ?person ?color {
{
QUOTED ?qOuter {
?person :says ?qInner
}
} UNION { # Union is necessary because :Alice's statement about :Red is not quoted
?person :says ?qInner
}
QUOTED ?qInner {
:Violets :haveColor ?color
}
} Dataset:
Results:
This would not allow access to quoted triples at specific nested depths, but given that such recursion problems are a more general limitation in SPARQL, this may be acceptable here. The advantage (or maybe not?) of this approach is that it blurs the boundary between quoted triples and named graphs, |
Another approach to explore is to add to the property path functionality. Beyond the WG timeframe, property path needs to add expressivity for conditions on the path and returning paths themselves. This feels similar to the quote triple examples here so looking for a common approach, either in style or adding a "go into" operator. |
This issue was discussed during the weekly meeting of July 6 (https://www.w3.org/2023/07/06-rdf-star-minutes.html). The conclusion of the group is that this issue is highly important. |
I'm opening this issue because I noticed that SPARQL-star doesn't offer a way to handle queries over nested quoted triples at an unknown depth.
Let's take the following dataset as an example:
Unless I'm missing something, there is no way to query all colors of
:Violet
,aside from taking the union of quoted triple patterns at different hardcoded depths.
This could be solved by providing a similar syntax to property paths,
but instead of defining paths of predicates between triples,
it would define paths between predicates while going deeper inside quoted triples.
For example, such a query could look like:
I'm opening this issue mainly to discuss whether or not we need and want to support such functionality in SPARQL.
The proposed syntax above and precise solution to this problem is therefore not important (yet).
This example is purely fictional, and I have no indications yet whether or not this case often occurs in practise.
The text was updated successfully, but these errors were encountered: