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

Lazy TransitivePath operation #1595

Merged
merged 18 commits into from
Nov 4, 2024
Merged

Conversation

RobinTF
Copy link
Collaborator

@RobinTF RobinTF commented Oct 29, 2024

This PR enables the TransitivePath operation to yield its result lazily and to consume its left/right child lazily. Note that the graph which is transitively traversed needs to be fully materialized due to the underlying algorithm. E.G when computing the (large) result of wdt:P31/wdt:P279*, the large result and the wdt:P31 can be dealt with lazily, but the full wdt:P279 predicate needs to be materialized.

Copy link

codecov bot commented Oct 29, 2024

Codecov Report

Attention: Patch coverage is 91.83673% with 16 lines in your changes missing coverage. Please review.

Project coverage is 89.11%. Comparing base (05a3f69) to head (b1014d1).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/engine/TransitivePathImpl.h 91.45% 1 Missing and 9 partials ⚠️
src/engine/TransitivePathBase.cpp 88.46% 0 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1595      +/-   ##
==========================================
+ Coverage   89.08%   89.11%   +0.02%     
==========================================
  Files         371      371              
  Lines       34437    34491      +54     
  Branches     3899     3908       +9     
==========================================
+ Hits        30678    30735      +57     
+ Misses       2484     2478       -6     
- Partials     1275     1278       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@joka921 joka921 left a comment

Choose a reason for hiding this comment

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

A first round of reviews.
Haven't checked the tests yet,
but otherwise this looks pretty good alright.

src/engine/TransitivePathBase.h Outdated Show resolved Hide resolved
src/engine/TransitivePathImpl.h Outdated Show resolved Hide resolved
src/engine/TransitivePathImpl.h Show resolved Hide resolved
src/engine/TransitivePathImpl.h Outdated Show resolved Hide resolved
src/engine/TransitivePathImpl.h Outdated Show resolved Hide resolved
Copy link
Member

@joka921 joka921 left a comment

Choose a reason for hiding this comment

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

Please reduce code duplication in the tests, otherwise we will try this out, the main code looks nice:)

test/TransitivePathTest.cpp Show resolved Hide resolved
test/TransitivePathTest.cpp Outdated Show resolved Hide resolved
test/TransitivePathTest.cpp Outdated Show resolved Hide resolved
test/TransitivePathTest.cpp Show resolved Hide resolved
test/TransitivePathTest.cpp Outdated Show resolved Hide resolved
test/TransitivePathTest.cpp Outdated Show resolved Hide resolved
test/TransitivePathTest.cpp Outdated Show resolved Hide resolved
test/TransitivePathTest.cpp Outdated Show resolved Hide resolved
@sparql-conformance
Copy link

Copy link

sonarcloud bot commented Oct 31, 2024

@joka921 joka921 merged commit a090167 into ad-freiburg:master Nov 4, 2024
22 checks passed
@RobinTF RobinTF deleted the lazy-transitive-path branch November 4, 2024 14:35
ullingerc pushed a commit to ullingerc/qlever that referenced this pull request Nov 12, 2024
This PR enables the `TransitivePath` operation to yield its result lazily and to consume its left/right child lazily. Note that the graph which is transitively traversed needs to be fully materialized due to the underlying algorithm. E.G when computing the (large) result of `wdt:P31/wdt:P279*`, the large result and the `wdt:P31` can be dealt with lazily, but the full `wdt:P279` predicate needs to be materialized.
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.

2 participants