-
Notifications
You must be signed in to change notification settings - Fork 85
Don't drop FILTER
operations with unbound variables
#2103
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
Don't drop FILTER
operations with unbound variables
#2103
Conversation
Signed-off-by: Johannes Kalmbach <johannes.kalmbach@gmail.com>
First feed this to the conformance tests, then write unit tests. Signed-off-by: Johannes Kalmbach <johannes.kalmbach@gmail.com>
First feed this to the conformance tests, then write unit tests. Signed-off-by: Johannes Kalmbach <johannes.kalmbach@gmail.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2103 +/- ##
==========================================
- Coverage 91.20% 91.19% -0.01%
==========================================
Files 434 434
Lines 42609 42617 +8
Branches 4805 4807 +2
==========================================
+ Hits 38860 38866 +6
Misses 2348 2348
- Partials 1401 1403 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good mostly, but I'd like to see an explanation for me to understand the changes a little better
src/engine/QueryPlanner.cpp
Outdated
void QueryPlanner::applyFiltersIfPossible( | ||
vector<SubtreePlan>& row, const vector<SparqlFilter>& filters) const { | ||
static_assert(!alsoApplyIfMissingVariables || replace); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If these options are somewhat exclusive, wouldn't it make sense to have an enum with 3 modes instead?
Also what I haven't understood, why is this even a template parameter in the first place? Does this justify the compilation overhead?
@@ -185,6 +185,43 @@ TEST(Union, ensurePermutationIsAppliedCorrectly) { | |||
} | |||
} | |||
|
|||
// _____________________________________________________________________________ | |||
TEST(Union, inputWithZeroColumns) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is of course an important edge case to consider, but I don't get how this is related to unbound variables. Please enlighten me
# Conflicts: # test/QueryPlannerTest.cpp
Signed-off-by: Johannes Kalmbach <johannes.kalmbach@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much
Signed-off-by: Johannes Kalmbach <johannes.kalmbach@gmail.com>
FILTER
operations with unbound variables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this fix! I tested this and it worked fine. I slightly revised the title and the description. In QueryPlanner.cpp:1338
not all possible outcomes are covered by tests yet. Is this a regression, @joka921, or was this already the case in the previous code?
@hannahbast |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to @joka921, the CodeCov complaint was an artifact, so I will merge this now.
|
Conformance check failed ❌Test Status Changes 📊
|
So far, QLever silently dropped
FILTER
operations that referred to variables that were unbound in the respective group graph pattern. This is now fixed. For example, the following query now has an empty result as it should: