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

Implement materialized index scans by materializing lazy scans #1323

Merged
merged 5 commits into from
Jun 13, 2024

Conversation

joka921
Copy link
Member

@joka921 joka921 commented Apr 15, 2024

This makes the code much simpler, and makes no difference for almost all queries. The expensive part (reading from disk and decompressing) is still done in parallel, only the writing to the IdTable is now serialized + there is an additional copy compared to before. An example query that is slower now because of this change is: materialize a large index scan (for example, for the predicate rdf:type) and group by subject (there is a shortcut for grouping by object when there are few objects). But such queries will become lazy soon anyway (see #1350) and then this will be irrelevant.

… scan.

This makes the code much simpler, and also shouldn't be to expensive, as the expensive parts (reading from disk and decompressing) are still done in parallel.
Copy link

codecov bot commented Apr 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.89%. Comparing base (8bbd3a7) to head (c74faec).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1323      +/-   ##
==========================================
- Coverage   88.89%   88.89%   -0.01%     
==========================================
  Files         326      326              
  Lines       28992    28931      -61     
  Branches     3214     3207       -7     
==========================================
- Hits        25773    25718      -55     
+ Misses       2066     2061       -5     
+ Partials     1153     1152       -1     

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

Copy link

sonarcloud bot commented Apr 15, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

// block in parallel
#pragma omp task
{
if (!cancellationHandle->isCancelled()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is the only usage of isCancelled() outside of tests I think. I'd suggest removing the function or replacing it with something like ASSERT_THROW(throwIfCancelled()) where it makes sense to keep assertions around.

Copy link

sonarcloud bot commented Jun 13, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

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.

Works like a charm and makes no difference for the first 20 example queries on Wikidata. See the revised description of the PR for more infos.

@hannahbast hannahbast merged commit e45f499 into ad-freiburg:master Jun 13, 2024
18 of 19 checks passed
realHannes pushed a commit to realHannes/qlever that referenced this pull request Jun 15, 2024
…eiburg#1323)

This makes the code much simpler, and makes no difference for almost all queries. The expensive part (reading from disk and decompressing) is still done in parallel, only the writing to the `IdTable` is now serialized + there is an additional copy compared to before. An example query that is slower now because of this change is: materialize a large index scan (for example, for the predicate `rdf:type`) and group by subject (there is a shortcut for grouping by object when there are few objects). But such queries will become lazy soon anyway (see ad-freiburg#1350) and then this will be irrelevant.
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.

None yet

3 participants