-
Notifications
You must be signed in to change notification settings - Fork 65
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
Allow computing the empty transitive path #1800
Conversation
Conformance check passed ✅Test Status Changes 📊
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1800 +/- ##
==========================================
- Coverage 90.05% 90.04% -0.01%
==========================================
Files 396 396
Lines 37928 37921 -7
Branches 4262 4260 -2
==========================================
- Hits 34156 34146 -10
- Misses 2477 2481 +4
+ Partials 1295 1294 -1 ☔ View full report in Codecov by Sentry. |
|
@RobinTF Awesome that you are looking into this. Will this also remove false negative "This query might have to evaluate the empty path" exception, like for the following query?
|
@hannahbast Depends on the query planning, I haven't tried any more complex queries. But this is the only "This query might have to evaluate the empty path" exception there is, so you definitely won't get this exact exception any more. |
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 needs a substantially differen implementation.
if (minDist_ == 0 && !isBoundOrId() && lhs_.isVariable() && | ||
rhs_.isVariable()) { | ||
AD_THROW( | ||
"This query might have to evaluate the empty path, which is " | ||
"currently " | ||
"not supported"); | ||
} |
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.
Unfortunately this is not quite correct.
The empty path must in principle contain everything, not only entities that are in some way contained in the Path with the *
. This means, that we have to fix this in the TurtleParser
.
@RobinTF OK, I just tried this on Wikidata and see what's happening. Let's take a simpler example query (prefixes omitted for brevity):
With this PR, the query no longer throws the "empty path" exception, but it also never finishes. The problem is that in the current implementation, QLever evaluates this just as it would evaluate the following query:
But the result for each of the two That would eventually give the correct result but takes forever and is obviously not how the query should be evaluated. |
@hannahbast Can you clarify? The issue you described seems just like poor query planning to me, where the query planner performs the join operation in a very inefficient position. If you replace the asterisk in your query with |
@RobinTF My point is the following:
|
@hannahbast Thank you for clarifying. I wanted to have a look at implementing negated paths anyways, so I spent some time today thinking about query planning of this particular case. So I might just start with the issue at hand first. |
This needs some other stuff to happen beforehand |
It seems like the code was already there, so all this PR does is removing the check.