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

Support (almost) arbitrary expressions for FILTER and HAVING #810

Merged

Conversation

joka921
Copy link
Member

@joka921 joka921 commented Oct 6, 2022

Also fixes #800

TODOs:

  • Early failure with readable messages on unsupported use of LANG().
  • Early failure with readable messages on use of expressions that don't return a boolean type. Support implicit conversion of all possible result types to bool.
  • Proper size and cost estimates from the expressions that can be used as filters.
  • E2E tests for complex filters and for the fixed bugs.

joka921 added 20 commits October 5, 2022 17:59
…expressions.

It is not yet integrated and yet requires proper size and cost estimates.
…nowledge base

TODO:
- Unit tests don't compile yet
- language filters don't work yet
- The size and cost estimates of the filters are not implemented yet, so the query planning is broken.
…se we have to fight with the nested matchers.
…maining TODOs:

[] Early failure with readable messages on unsupported use of `LANG()`.
[] Early failure with readable messages on use of expressions that don't return a boolean type.
[] Proper size and cost estimates from the expressions that can be used as filters.
TODO: There is a "Literal" class in the parser which should be "TripleComponent" to make the stuff work consistently. that would be the next step.
TODO:
- Remaining size and cost estimates.
- Earlier error messages.
The only thing that is really not working is
HAVING(AGGREGATE(?something))
Because the ?something variable is not visible anymore after the GROUP BY. We need a different approach for this.
(multiple having clauses, filter on full scan).
TOODO: Add e2e tests for these bugs.
I should really consider splitting this up into "preparing", "actual", and "unrelated" work.
added some comments.
Early failure (during the parsing) for unsupported `LANG` function usages.
@joka921 joka921 marked this pull request as ready for review October 10, 2022 08:34
Copy link
Member

@hannahbast hannahbast left a comment

Choose a reason for hiding this comment

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

Awesome, another milestone

Copy link
Member

@hannahbast hannahbast left a comment

Choose a reason for hiding this comment

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

Minor changes left + possibly a bug fix for negation (which currently is a no op)

Copy link
Member

@hannahbast hannahbast left a comment

Choose a reason for hiding this comment

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

Awesome + negation now works as well!

@hannahbast hannahbast merged commit 4ecc5a6 into ad-freiburg:master Oct 12, 2022
@joka921 joka921 deleted the integrate_expressions_into_filters branch October 13, 2022 07:56
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.

?s ?p ?o with FILTER ignores the FILTER
2 participants