-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add temporal relation filter to TREE link traversal #82
Comments
Thanks for the suggestion! |
Let’s say the data looks like this: <C> a tree:Collection ;
tree:view <> ;
tree:member <A> .
<> a tree:Node ;
tree:relation <R1> .
<R1> a tree:GreaterThanRelation ;
tree:path dcterms:modified ;
tree:node
tree:value "2022-10-20"^^xsd:dateTIme .
<A> dcterms:modified "2022-10-19" . An a query: SELECT * WHERE {
?s dcterms:modified ?date .
FILTER (?date < "2022-10-20"^^xsd:dateTime )
} We’ll need to do 2 things: 1. Path matchingBased on the SPARQL query, we should automatically find the path, and check whether the path matches with the path documented in the relation.
2. Applying the relationProbably a big switch case that checks the relation, and executes a comparison function. The functionality might depend on the RDF.DataType. E.G., the implementation of tree:GreaterThanRelation is different for an xsd:dateTime than for a number. |
Other links: Previous implementation in Comunica v1:
Probably we also can use SPARQLEE to reuse things like FILTER functions: (e.G., https://github.com/comunica/sparqlee/blob/860775660d85664e1bec550dad8fb54f8a0a65d8/lib/functions/RegularFunctions.ts) |
Issue type:
Description:
The TREE link traversal at the moment is pretty slow. One way to improve the performance would be to exploit the indexation of members provided by the TREE specification. Indeed the
tree:relation
can also define a constraint that the following nodes members must respect. This is done using the propertiestree:path
,tree:value
and by specifying a TREE comparison operators as a type for thetree:relation
.Approach Proposed
I proposed to create a new bus called
bus-optimize-link-traversal
that will provide actors related to query planning/traversal optimization. In the case of this filter, an actor will check if a SPAQL FILTER operator exists, if so it will provide a filter function that will be placed into the context. The TREE traversal will then use the function to reject links that doesn't respect the filter function.The text was updated successfully, but these errors were encountered: