Skip to content
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

Feature/static filter for the TREE specification #86

Open
wants to merge 207 commits into
base: master
Choose a base branch
from

Conversation

constraintAutomaton
Copy link
Member

@constraintAutomaton constraintAutomaton commented Nov 8, 2022

Static filter for the TREE specification

The objective of this PR is to implement SPARQL filters in a way that when the query contains a filter expression, the next nodes describe by the current TREE relation that cannot be satisfy with the filter will not be followed. The filters are called static because they are applied before the execution of the query, so the binding during execution has no impact on the pursuit of nodes.

Implementation

The TREE traversal extractor provided an ITreeNode object containing "all" the relevant metadata information.

The FilterNode class provide to the solver the TREE relation, the filter expression and the effective variable. The solver than interpret the TREE relation and the filter expression as a boolean expression. The solution domain is after evaluating first for only the filter expression than with the filter expression and the TREE relation. If the domain is empty than a false value associated with the relation is inserted in a map in the FilterNode class (as it is impossible that a document can match the filter will be found). The operation is repeated for all the relation and a map of those results are forwarded to the TREE extractor actor that prune the irrelevant links.

Limitation

  • Only support number convertible values
    • integer
    • fraction
    • date time
    • boolean

Perceptive

  • Support of SHACL path
    • For the moment we only support direct path
  • Support for functions
  • Support for strings

linked to #82

Copy link
Member

@rubensworks rubensworks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Things are still very vague to me as to how everything works.
I think adding some more documentation would help a lot.

Also, I'm not convinced yet about the optimize-link-traversal bus, as it seems to be tailored specifically to tree, and is not link-traversal-wide.
Can we move this logic into the tree-specific actor on the link extraction bus?
If not, can we make this optimize bus independent of tree?

@constraintAutomaton constraintAutomaton marked this pull request as draft June 5, 2023 14:03
@constraintAutomaton constraintAutomaton marked this pull request as ready for review June 6, 2023 13:26
@constraintAutomaton constraintAutomaton deleted the feature/time-filtering-tree-sparqlee-implementation branch June 5, 2024 06:46
@constraintAutomaton constraintAutomaton restored the feature/time-filtering-tree-sparqlee-implementation branch June 5, 2024 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants