Skip to content

Commit 8910f61

Browse files
author
Hannah Bast
committed
Some clean up before splitting off a first smaller PR
1 parent e88c293 commit 8910f61

File tree

4 files changed

+232
-201
lines changed

4 files changed

+232
-201
lines changed

src/index/DeltaTriples.h

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,16 @@
1717
// building, we call these delta triples. How it works in principle:
1818
//
1919
// 1. For each delta triple, find the location in each permutation (block index
20-
// and index within that block, see end of the file for an exact definition).
20+
// and index within that block, see `index/LocatedTriples.h`).
2121
//
2222
// 2. For each permutation and each block, store a sorted list of the positions
2323
// of the delta triples within that block.
2424
//
2525
// 3. In the call of `PermutationImpl::scan`, use the respective lists to merge
2626
// the relevant delta tripless into the index scan result.
2727
//
28+
// NOTE: The delta triples currently do not go well together with CACHING. See
29+
// the discussion at the end of this file.
2830
class DeltaTriples {
2931
private:
3032
// The index to which these triples are added.
@@ -121,9 +123,7 @@ class DeltaTriples {
121123
void eraseTripleInAllPermutations(LocatedTripleHandles& handles);
122124
};
123125

124-
// More detailed discussion and information about the `DeltaTriples` class.
125-
//
126-
// A. DELTA TRIPLES AND THE CACHE
126+
// DELTA TRIPLES AND THE CACHE
127127
//
128128
// For now, our approach only works when the results of index scans are not
129129
// cached (unless there are no relevant delta triples for a particular scan).
@@ -140,26 +140,3 @@ class DeltaTriples {
140140
// store and maintain the positions in those uncompressed index scans. However,
141141
// this would only work for the results of index scans. For the results of more
142142
// complex subqueries, it's hard to figure out which delta triples are relevant.
143-
//
144-
// B. DEFINITION OF THE POSITION OF A DELTA TRIPLE IN A PERMUTATION
145-
//
146-
// 1. The position is defined by the index of a block in the permutation and the
147-
// index of a row within that block.
148-
//
149-
// 2. If the triple in contained in the permutation, it is contained exactly
150-
// once and so there is a well defined block and position in that block.
151-
//
152-
// 2. If there is a block, where the first triple is smaller and the last triple
153-
// is larger, then that is the block and the position in that block is that of
154-
// the first triple that is (not smaller and hence) larger.
155-
//
156-
// 3. If the triple falls "between two blocks" (the last triple of the previous
157-
// block is smaller and the first triple of the next block is larger), then the
158-
// position is the first position in that next block.
159-
//
160-
// 4. As a special case of 3., if the triple is smaller than all triples in the
161-
// permutation, the position is the first position of the first block.
162-
//
163-
// 5. If the triple is larger than all triples in the permutation, the block
164-
// index is one after the largest block index and the position within that
165-
// non-existing block is arbitrary.

0 commit comments

Comments
 (0)