-
Notifications
You must be signed in to change notification settings - Fork 107
IndexScan only has LocatedTriples for the relevant permutation
#2618
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
base: master
Are you sure you want to change the base?
Changes from 12 commits
cb2eb4e
182b23e
c25381d
67a4859
bcdbeca
2be0057
56e6f01
6868cef
3b4c740
a05f4fc
9a99b3a
2b3fa80
bcdc3c8
862eae2
8c55136
edd6a90
e850238
2e1516a
d4590a5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,8 @@ | |
|
|
||
| #include "engine/PermutationSelector.h" | ||
|
|
||
| #include <utility> | ||
|
|
||
| #include "index/IndexImpl.h" | ||
|
|
||
| namespace { | ||
|
|
@@ -34,9 +36,9 @@ bool containsInternalIri(const SparqlTripleSimple& triple) { | |
|
|
||
| namespace qlever { | ||
| // _____________________________________________________________________________ | ||
| std::shared_ptr<const Permutation> getPermutationForTriple( | ||
| Permutation::Enum permutation, const Index& index, | ||
| const SparqlTripleSimple& triple) { | ||
| PermutationPtr getPermutationForTriple(Permutation::Enum permutation, | ||
| const Index& index, | ||
| const SparqlTripleSimple& triple) { | ||
| auto actualPermutation = index.getImpl().getPermutationPtr(permutation); | ||
|
|
||
| if (containsInternalIri(triple)) { | ||
|
|
@@ -47,4 +49,26 @@ std::shared_ptr<const Permutation> getPermutationForTriple( | |
| } | ||
| return actualPermutation; | ||
| } | ||
|
|
||
| // _____________________________________________________________________________ | ||
| LocatedTriplesPerBlockPtr getLocatedTriplesPerBlockForTriple( | ||
| Permutation::Enum permutation, LocatedTriplesSnapshotPtr snapshot, | ||
| const SparqlTripleSimple& triple) { | ||
| // Create alias shared pointer of internal the right `LocatedTriplesPerBlock`. | ||
| const auto& locatedTriples = | ||
| containsInternalIri(triple) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have the exact same check in |
||
| ? snapshot->getInternalLocatedTriplesForPermutation(permutation) | ||
| : snapshot->getLocatedTriplesForPermutation(permutation); | ||
| return LocatedTriplesPerBlockPtr{std::move(snapshot), &locatedTriples}; | ||
| } | ||
|
|
||
| // _____________________________________________________________________________ | ||
| std::pair<PermutationPtr, LocatedTriplesPerBlockPtr> | ||
| getPermutationAndLocatedTriplesPerBlockForTriple( | ||
| Permutation::Enum permutation, const Index& index, | ||
| LocatedTriplesSnapshotPtr snapshot, const SparqlTripleSimple& triple) { | ||
| return {getPermutationForTriple(permutation, index, triple), | ||
| getLocatedTriplesPerBlockForTriple(permutation, std::move(snapshot), | ||
| triple)}; | ||
| } | ||
| } // namespace qlever | ||
Uh oh!
There was an error while loading. Please reload this page.