ad-freiburg / qlever

Very fast SPARQL Engine, which can handle very large knowledge graphs like the complete Wikidata, offers context-sensitive autocompletion for SPARQL queries, and allows combination with text search. It's faster than engines like Blazegraph or Virtuoso, especially for queries involving large result sets.
Apache License 2.0
417 stars 52 forks source link

Improve `ScanSpecification` + fix empty index scan bugs #1495

Closed joka921 closed 1 month ago

joka921 commented 2 months ago

The ScanSpecification class now has two additional members: a LocalVocab and a set of graphs. The LocalVocab enables that one or several of the col0Id, col1Id, col2Id can be new IRIs or literals (note that our comparators work fine even exactly the same IRI or literal is contained in different LocalVocabs). This is important for SPARQL Update. The set of graphs enables filtering of the scan result by one or severval graph IRIs.

Also convert ScanSpecificationAsTripelComponent to ScanSpecification already in the IndexScan class (where we already have an Index available to convert the TripleComponents to Ids). In a future change, we might want to get rid of ScanSpecificationAsTripelComponent altogether and produce a ScanSpecification right away.

On the side, clean up the code and fix several bugs for empty results of index scan operations that only occur with lazy operations.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 98.63014% with 1 line in your changes missing coverage. Please review.

Project coverage is 94.21%. Comparing base (691439c) to head (29512bd). Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
src/engine/CountAvailablePredicates.cpp 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1495 +/- ## ========================================== + Coverage 94.15% 94.21% +0.05% ========================================== Files 347 348 +1 Lines 25631 25741 +110 Branches 3446 3460 +14 ========================================== + Hits 24134 24253 +119 + Misses 1455 1446 -9 Partials 42 42 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud