Class IncrementalNaturalJoinStateManagerTypedBase
java.lang.Object
io.deephaven.engine.table.impl.StaticNaturalJoinStateManager
io.deephaven.engine.table.impl.naturaljoin.IncrementalNaturalJoinStateManagerTypedBase
- All Implemented Interfaces:
BothIncrementalNaturalJoinStateManager,IncrementalNaturalJoinStateManager
public abstract class IncrementalNaturalJoinStateManagerTypedBase
extends StaticNaturalJoinStateManager
implements IncrementalNaturalJoinStateManager, BothIncrementalNaturalJoinStateManager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from interface io.deephaven.engine.table.impl.BothIncrementalNaturalJoinStateManager
BothIncrementalNaturalJoinStateManager.InitialBuildContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longHow many entries are in the alternate table (includes tombstones)?protected intprotected final WritableColumnSource[]protected ImmutableObjectArraySource<WritableRowSet> protected ImmutableLongArraySourceprotected ImmutableLongArraySourceprotected intprotected final ChunkType[]protected it.unimi.dsi.fastutil.longs.LongArrayListprotected longHow many values do we have that are live (in both main and alternate)?protected intprotected final WritableColumnSource[]protected ImmutableObjectArraySource<WritableRowSet> protected ImmutableLongArraySourceprotected ImmutableLongArraySourceWe use a RowSet.NULL_ROW_KEY for a state that exists, but has no right hand side; the column sources are initialized with NULL_LONG for something that does not exist.protected longprotected longHow many entries are taking up slots in the main hash table (includes tombstones)?static final intThe alternate slots a partial rehash examines for each entry about to be built.protected intprotected ObjectArraySource<WritableRowSet> protected intFields inherited from class io.deephaven.engine.table.impl.StaticNaturalJoinStateManager
addOnly, DUPLICATE_RIGHT_VALUE, joinType, keySourcesForErrorMessages, NO_RIGHT_ENTRY_VALUEFields inherited from interface io.deephaven.engine.table.impl.IncrementalNaturalJoinStateManager
EMPTY_RIGHT_STATE, FIRST_DUPLICATE, TOMBSTONE_RIGHT_STATE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedIncrementalNaturalJoinStateManagerTypedBase(ColumnSource<?>[] tableKeySources, ColumnSource<?>[] keySourcesForErrorMessages, int tableSize, double maximumLoadFactor, NaturalJoinType joinType, boolean addOnly) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidaddLeftSide(RowSequence rowSequence, Chunk[] sourceKeyChunks, LongArraySource leftRedirections, long redirectionOffset, NaturalJoinModifiedSlotTracker modifiedSlotTracker) voidaddLeftSide(Context bc, RowSequence leftRowSet, ColumnSource<?>[] leftSources, LongArraySource leftRedirections, @NotNull NaturalJoinModifiedSlotTracker modifiedSlotTracker, boolean addedToTable) Add left rows to their key's slots, storing each row's right redirection (by position) inleftRedirections.protected abstract voidaddRightSide(RowSequence rowSequence, Chunk[] sourceKeyChunks, NaturalJoinModifiedSlotTracker modifiedSlotTracker) voidaddRightSide(Context bc, RowSequence rightRowSet, ColumnSource<?>[] rightSources, @NotNull NaturalJoinModifiedSlotTracker modifiedSlotTracker) protected abstract voidAfter creating the new alternate key states, advise the derived classes, so they can cast them to the typed versions of the column source and adjust the derived class pointers.protected longprotected abstract voidapplyLeftShift(RowSequence rowSequence, Chunk[] sourceKeyChunks, NaturalJoinModifiedSlotTracker modifiedSlotTracker) voidapplyLeftShift(Context pc, ColumnSource<?>[] leftSources, RowSet shiftedRowSet, long shiftDelta, @NotNull NaturalJoinModifiedSlotTracker modifiedSlotTracker) Move the left rows of one shift range within their slots' left row sets.protected abstract voidapplyRightShift(RowSequence rowSequence, Chunk[] sourceKeyChunks, long shiftDelta, NaturalJoinModifiedSlotTracker modifiedSlotTracker, IncrementalNaturalJoinStateManagerTypedBase.ProbeContext pc) voidapplyRightShift(Context pc, ColumnSource<?>[] rightSources, RowSet shiftedRowSet, long shiftDelta, @NotNull NaturalJoinModifiedSlotTracker modifiedSlotTracker) protected abstract voidbuildFromLeftSide(RowSequence rowSequence, Chunk[] sourceKeyChunks) protected abstract voidbuildFromRightSide(RowSequence rowSequence, Chunk[] sourceKeyChunks) voidbuildFromRightSide(Table rightTable, ColumnSource<?>[] rightSources) buildIndexedRowRedirection(QueryTable leftTable, BothIncrementalNaturalJoinStateManager.InitialBuildContext ibc, ColumnSource<RowSet> indexRowSets, JoinControl.RedirectionType redirectionType) buildRowRedirectionFromRedirections(QueryTable leftTable, BothIncrementalNaturalJoinStateManager.InitialBuildContext ibc, JoinControl.RedirectionType redirectionType) protected voidbuildTable(boolean initialBuild, IncrementalNaturalJoinStateManagerTypedBase.BuildContext bc, RowSequence buildRows, ColumnSource<?>[] buildSources, TypedHasherUtil.BuildHandler buildHandler, NaturalJoinModifiedSlotTracker modifiedSlotTracker) protected voidDrop the alternate table once every live entry has migrated to the main table.voidintcomputeTableSize(int nextChunkSize, int alternateSize, boolean fullRehash) voiddecorateLeftSide(RowSet leftRows, ColumnSource<?>[] leftSources, BothIncrementalNaturalJoinStateManager.InitialBuildContext ibc) voiddecorateLeftSide(RowSet leftRowSet, ColumnSource<?>[] leftSources, LongArraySource leftRedirections) booleandoRehash(boolean fullRehash, MutableInt rehashCredits, int nextChunkSize, NaturalJoinModifiedSlotTracker modifiedSlotTracker) protected longduplicateLocationFromRowKey(long rowKey) protected voidfreeDuplicateLocation(long duplicateLocation) getLeftRowSet(int slot) longgetRightRowKey(int slot) getRightRowSet(int slot) protected inthashToTableLocation(int hash) protected inthashToTableLocationAlternate(int hash) keyString(int slot) makeBuildContext(ColumnSource<?>[] buildSources, long maxSize) makeProbeContext(ColumnSource<?>[] buildSources, long maxSize) protected abstract voidmigrateFront(NaturalJoinModifiedSlotTracker modifiedSlotTracker) protected abstract voidmodifyByRight(RowSequence rowSequence, Chunk[] sourceKeyChunks, NaturalJoinModifiedSlotTracker modifiedSlotTracker) voidmodifyByRight(Context pc, RowSet modified, ColumnSource<?>[] rightSources, @NotNull NaturalJoinModifiedSlotTracker modifiedSlotTracker) protected voidprobeTable(IncrementalNaturalJoinStateManagerTypedBase.ProbeContext pc, RowSequence probeRows, boolean usePrev, ColumnSource<?>[] probeSources, TypedHasherUtil.ProbeHandler handler) protected abstract voidrehashInternalFull(int oldSize) protected abstract intrehashInternalPartial(int numEntriesToRehash, NaturalJoinModifiedSlotTracker modifiedSlotTracker) Migrate entries from the alternate table, examiningREHASH_SLOTS_PER_ENTRYalternate slots, whether they hold a live entry, a tombstone or nothing, for each entry's worth of work requested.booleanrehashRequired(int nextChunkSize) protected abstract voidremoveLeft(RowSequence rowSequence, Chunk[] sourceKeyChunks, NaturalJoinModifiedSlotTracker modifiedSlotTracker) voidremoveLeft(Context pc, RowSequence leftIndex, ColumnSource<?>[] leftSources, NaturalJoinModifiedSlotTracker modifiedSlotTracker) voidremoveLeftModifications(ColumnSource<?>[] leftSources, RowSet modifiedPreShift, RowSet modifiedPostShift, RowSetBuilderSequential changedPreShift, RowSetBuilderSequential changedPostShift, NaturalJoinModifiedSlotTracker modifiedSlotTracker) In a single pass over the modified left rows, determine which rows' key value actually changed (by comparing the current key values at the post-shift row keys with the previous key values at the pre-shift row keys), remove those changed rows from their previous-key hash slots, and report the changed keys.protected abstract voidremoveRight(RowSequence rowSequence, Chunk[] sourceKeyChunks, NaturalJoinModifiedSlotTracker modifiedSlotTracker) voidremoveRight(Context pc, RowSequence rightRowSet, ColumnSource<?>[] rightSources, @NotNull NaturalJoinModifiedSlotTracker modifiedSlotTracker) voidremoveRightModifications(ColumnSource<?>[] rightSources, RowSet modifiedPreShift, RowSet modifiedPostShift, RowSetBuilderSequential changedPreShift, RowSetBuilderSequential changedPostShift, @NotNull NaturalJoinModifiedSlotTracker modifiedSlotTracker) The right-side counterpart ofBothIncrementalNaturalJoinStateManager.removeLeftModifications(io.deephaven.engine.table.ColumnSource<?>[], io.deephaven.engine.rowset.RowSet, io.deephaven.engine.rowset.RowSet, io.deephaven.engine.rowset.RowSetBuilderSequential, io.deephaven.engine.rowset.RowSetBuilderSequential, io.deephaven.engine.table.impl.NaturalJoinModifiedSlotTracker): in a single pass over the modified right rows, determine which rows' key value actually changed, remove those rows from their previous-key hash slots, and report the changed keys.protected longrowKeyFromDuplicateLocation(long duplicateLocation) protected voidtombstoneSlot(boolean main, long location, NaturalJoinModifiedSlotTracker modifiedSlotTracker) Mark a slot dead once its last left row and last right row are gone.Methods inherited from class io.deephaven.engine.table.impl.StaticNaturalJoinStateManager
buildRowRedirection, checkExactMatch, extractKeyStringFromSourceTableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.deephaven.engine.table.impl.IncrementalNaturalJoinStateManager
addRightRowKeyToDuplicates, checkExactMatch, duplicateCreationChangesState, getRightRowKeyFromDuplicates, removeRightRowKeyFromDuplicates, shiftOneKey
-
Field Details
-
REHASH_SLOTS_PER_ENTRY
public static final int REHASH_SLOTS_PER_ENTRYThe alternate slots a partial rehash examines for each entry about to be built. Bounding the slots examined, rather than the live entries moved, keeps one build from scanning a long run of tombstones and empty slots;computeTableSize(int, int, boolean)sizes a new table so that the alternate still drains before the new table fills. That requires a maximum load factor greater than1 / REHASH_SLOTS_PER_ENTRY: at or below it, a new table the size of the alternate cannot pay for examining every alternate slot once anything is live or being built, so every rehash would double the table. Just above it, the table stabilizes only once it is many times the live entries. The generated hashers refer to this constant, so changing it changes both the drain rate and the sizing.- See Also:
-
tableSize
protected int tableSize -
alternateTableSize
protected int alternateTableSize -
rehashPointer
protected int rehashPointer -
numEntries
protected long numEntriesHow many entries are taking up slots in the main hash table (includes tombstones)? -
liveEntries
protected long liveEntriesHow many values do we have that are live (in both main and alternate)? -
alternateEntries
protected long alternateEntriesHow many entries are in the alternate table (includes tombstones)? -
chunkTypes
-
mainKeySources
-
alternateKeySources
-
mainRightRowKey
We use a RowSet.NULL_ROW_KEY for a state that exists, but has no right hand side; the column sources are initialized with NULL_LONG for something that does not exist. When there are multiple right rows, we store a value less than TOMBSTONE_RIGHT_STATE, which is a position in the rightSideDuplicateRowSets (-3 maps to 0, -4 to 1, etc.). We must maintain the right side duplicates so that we do not need a rescan; but in the common (as opposed to impending error) case of a single value we do not want to allocate any objects The TOMBSTONE_RIGHT_STATE indicates that the row was deleted.
-
alternateRightRowKey
-
mainLeftRowSet
-
mainModifiedTrackerCookieSource
-
alternateLeftRowSet
-
alternateModifiedTrackerCookieSource
-
rightSideDuplicateRowSets
-
nextDuplicateRightSide
protected long nextDuplicateRightSide -
freeDuplicateValues
protected it.unimi.dsi.fastutil.longs.LongArrayList freeDuplicateValues -
mainInsertMask
protected int mainInsertMask -
alternateInsertMask
protected int alternateInsertMask
-
-
Constructor Details
-
IncrementalNaturalJoinStateManagerTypedBase
protected IncrementalNaturalJoinStateManagerTypedBase(ColumnSource<?>[] tableKeySources, ColumnSource<?>[] keySourcesForErrorMessages, int tableSize, double maximumLoadFactor, NaturalJoinType joinType, boolean addOnly)
-
-
Method Details
-
makeBuildContext
public IncrementalNaturalJoinStateManagerTypedBase.BuildContext makeBuildContext(ColumnSource<?>[] buildSources, long maxSize) - Specified by:
makeBuildContextin interfaceBothIncrementalNaturalJoinStateManager
-
makeProbeContext
public IncrementalNaturalJoinStateManagerTypedBase.ProbeContext makeProbeContext(ColumnSource<?>[] buildSources, long maxSize) - Specified by:
makeProbeContextin interfaceBothIncrementalNaturalJoinStateManager
-
buildTable
protected void buildTable(boolean initialBuild, IncrementalNaturalJoinStateManagerTypedBase.BuildContext bc, RowSequence buildRows, ColumnSource<?>[] buildSources, TypedHasherUtil.BuildHandler buildHandler, NaturalJoinModifiedSlotTracker modifiedSlotTracker) -
probeTable
protected void probeTable(IncrementalNaturalJoinStateManagerTypedBase.ProbeContext pc, RowSequence probeRows, boolean usePrev, ColumnSource<?>[] probeSources, TypedHasherUtil.ProbeHandler handler) -
doRehash
public boolean doRehash(boolean fullRehash, MutableInt rehashCredits, int nextChunkSize, NaturalJoinModifiedSlotTracker modifiedSlotTracker) - Parameters:
fullRehash- should we rehash the entire table (if false, we rehash incrementally)rehashCredits- the rehash work this operation has done, in entries' worth of alternate slots examined (REHASH_SLOTS_PER_ENTRYslots each), which pays for building as many entries (input/output)nextChunkSize- the size of the chunk we are processing- Returns:
- true if a front migration is required
-
adviseNewAlternate
protected abstract void adviseNewAlternate()After creating the new alternate key states, advise the derived classes, so they can cast them to the typed versions of the column source and adjust the derived class pointers. -
clearAlternate
protected void clearAlternate()Drop the alternate table once every live entry has migrated to the main table. Any tracker entry that referred to an alternate slot was moved to the slot's main location as it migrated, so nothing reads the alternate sources afterwards and their arrays are released. -
rehashRequired
public boolean rehashRequired(int nextChunkSize) -
computeTableSize
public int computeTableSize(int nextChunkSize, int alternateSize, boolean fullRehash) - Parameters:
nextChunkSize- the size of the chunk about to be builtalternateSize- the size of the table that becomes the alternatefullRehash- whether the whole table is rehashed at once, leaving no alternate to drain- Returns:
- the size of the new table
-
rehashInternalFull
protected abstract void rehashInternalFull(int oldSize) -
migrateFront
-
rehashInternalPartial
protected abstract int rehashInternalPartial(int numEntriesToRehash, NaturalJoinModifiedSlotTracker modifiedSlotTracker) Migrate entries from the alternate table, examiningREHASH_SLOTS_PER_ENTRYalternate slots, whether they hold a live entry, a tombstone or nothing, for each entry's worth of work requested.- Parameters:
numEntriesToRehash- the entries' worth of work to do, which pays for building as many entries- Returns:
- the entries' worth of work done: the slots examined divided by
REHASH_SLOTS_PER_ENTRY, ornumEntriesToRehashif the alternate table was drained
-
hashToTableLocation
protected int hashToTableLocation(int hash) -
hashToTableLocationAlternate
protected int hashToTableLocationAlternate(int hash) -
duplicateLocationFromRowKey
protected long duplicateLocationFromRowKey(long rowKey) -
rowKeyFromDuplicateLocation
protected long rowKeyFromDuplicateLocation(long duplicateLocation) -
allocateDuplicateLocation
protected long allocateDuplicateLocation() -
freeDuplicateLocation
protected void freeDuplicateLocation(long duplicateLocation) -
getRightRowKey
public long getRightRowKey(int slot) - Specified by:
getRightRowKeyin interfaceIncrementalNaturalJoinStateManager
-
getLeftRowSet
- Specified by:
getLeftRowSetin interfaceIncrementalNaturalJoinStateManager
-
getRightRowSet
- Specified by:
getRightRowSetin interfaceIncrementalNaturalJoinStateManager
-
keyString
- Specified by:
keyStringin interfaceIncrementalNaturalJoinStateManager
-
buildIndexedRowRedirection
public WritableRowRedirection buildIndexedRowRedirection(QueryTable leftTable, BothIncrementalNaturalJoinStateManager.InitialBuildContext ibc, ColumnSource<RowSet> indexRowSets, JoinControl.RedirectionType redirectionType) - Specified by:
buildIndexedRowRedirectionin interfaceBothIncrementalNaturalJoinStateManager
-
buildRowRedirectionFromRedirections
public WritableRowRedirection buildRowRedirectionFromRedirections(QueryTable leftTable, BothIncrementalNaturalJoinStateManager.InitialBuildContext ibc, JoinControl.RedirectionType redirectionType) - Specified by:
buildRowRedirectionFromRedirectionsin interfaceBothIncrementalNaturalJoinStateManager
-
buildFromRightSide
-
applyRightShift
protected abstract void applyRightShift(RowSequence rowSequence, Chunk[] sourceKeyChunks, long shiftDelta, NaturalJoinModifiedSlotTracker modifiedSlotTracker, IncrementalNaturalJoinStateManagerTypedBase.ProbeContext pc) -
modifyByRight
public void modifyByRight(Context pc, RowSet modified, ColumnSource<?>[] rightSources, @NotNull @NotNull NaturalJoinModifiedSlotTracker modifiedSlotTracker) - Specified by:
modifyByRightin interfaceBothIncrementalNaturalJoinStateManager
-
modifyByRight
protected abstract void modifyByRight(RowSequence rowSequence, Chunk[] sourceKeyChunks, NaturalJoinModifiedSlotTracker modifiedSlotTracker) -
removeRight
public void removeRight(Context pc, RowSequence rightRowSet, ColumnSource<?>[] rightSources, @NotNull @NotNull NaturalJoinModifiedSlotTracker modifiedSlotTracker) - Specified by:
removeRightin interfaceBothIncrementalNaturalJoinStateManager
-
removeRight
protected abstract void removeRight(RowSequence rowSequence, Chunk[] sourceKeyChunks, NaturalJoinModifiedSlotTracker modifiedSlotTracker) -
buildFromRightSide
- Specified by:
buildFromRightSidein interfaceBothIncrementalNaturalJoinStateManager
-
decorateLeftSide
public void decorateLeftSide(RowSet leftRows, ColumnSource<?>[] leftSources, BothIncrementalNaturalJoinStateManager.InitialBuildContext ibc) - Specified by:
decorateLeftSidein interfaceBothIncrementalNaturalJoinStateManager
-
buildFromLeftSide
-
addRightSide
public void addRightSide(Context bc, RowSequence rightRowSet, ColumnSource<?>[] rightSources, @NotNull @NotNull NaturalJoinModifiedSlotTracker modifiedSlotTracker) - Specified by:
addRightSidein interfaceBothIncrementalNaturalJoinStateManager
-
addRightSide
protected abstract void addRightSide(RowSequence rowSequence, Chunk[] sourceKeyChunks, NaturalJoinModifiedSlotTracker modifiedSlotTracker) -
addLeftSide
public void addLeftSide(Context bc, RowSequence leftRowSet, ColumnSource<?>[] leftSources, LongArraySource leftRedirections, @NotNull @NotNull NaturalJoinModifiedSlotTracker modifiedSlotTracker, boolean addedToTable) Description copied from interface:BothIncrementalNaturalJoinStateManagerAdd left rows to their key's slots, storing each row's right redirection (by position) inleftRedirections.- Specified by:
addLeftSidein interfaceBothIncrementalNaturalJoinStateManager- Parameters:
bc- the build contextleftRowSet- the left rows to addleftSources- the left key sourcesleftRedirections- receives the right row key (orRowSequence.NULL_ROW_KEY) of each row, by positionmodifiedSlotTracker- the tracker, whose per-slot builders accumulate the added keys of each slotaddedToTable- whether the rows were added to the left table this cycle, as opposed to rows that were present before this cycle and whose key value changed; only rows added to the table are counted by the tracker as rows whose right values need no reporting
-
addLeftSide
protected abstract void addLeftSide(RowSequence rowSequence, Chunk[] sourceKeyChunks, LongArraySource leftRedirections, long redirectionOffset, NaturalJoinModifiedSlotTracker modifiedSlotTracker) -
removeLeft
public void removeLeft(Context pc, RowSequence leftIndex, ColumnSource<?>[] leftSources, NaturalJoinModifiedSlotTracker modifiedSlotTracker) - Specified by:
removeLeftin interfaceBothIncrementalNaturalJoinStateManager
-
tombstoneSlot
protected void tombstoneSlot(boolean main, long location, NaturalJoinModifiedSlotTracker modifiedSlotTracker) Mark a slot dead once its last left row and last right row are gone. Any modified slot tracker entry the slot holds this cycle describes the key that just died, so it is discarded rather than applied to the key that later reuses the slot. The slot's (now empty) left row set is released; a key that later reuses the slot builds a fresh one. -
removeLeftModifications
public void removeLeftModifications(ColumnSource<?>[] leftSources, RowSet modifiedPreShift, RowSet modifiedPostShift, RowSetBuilderSequential changedPreShift, RowSetBuilderSequential changedPostShift, NaturalJoinModifiedSlotTracker modifiedSlotTracker) Description copied from interface:BothIncrementalNaturalJoinStateManagerIn a single pass over the modified left rows, determine which rows' key value actually changed (by comparing the current key values at the post-shift row keys with the previous key values at the pre-shift row keys), remove those changed rows from their previous-key hash slots, and report the changed keys. Rows whose key value is unchanged are collapsed away entirely, so the caller avoids the hash lookups and per-key row set churn of removing and re-adding them. The previous key values are read only once: the same values used for the equality test are reused to drive the removal.- Specified by:
removeLeftModificationsin interfaceBothIncrementalNaturalJoinStateManager- Parameters:
leftSources- the left key sourcesmodifiedPreShift- the modified rows, in pre-shift key space, aligned positionally withmodifiedPostShiftmodifiedPostShift- the modified rows, in post-shift key spacechangedPreShift- output, ascending, receives the pre-shift keys whose key value changed, aligned withchangedPostShift(for the caller's redirection removal)changedPostShift- output, ascending, receives the post-shift keys whose key value changed (to be re-added by the caller)
-
removeLeft
protected abstract void removeLeft(RowSequence rowSequence, Chunk[] sourceKeyChunks, NaturalJoinModifiedSlotTracker modifiedSlotTracker) -
removeRightModifications
public void removeRightModifications(ColumnSource<?>[] rightSources, RowSet modifiedPreShift, RowSet modifiedPostShift, RowSetBuilderSequential changedPreShift, RowSetBuilderSequential changedPostShift, @NotNull @NotNull NaturalJoinModifiedSlotTracker modifiedSlotTracker) Description copied from interface:BothIncrementalNaturalJoinStateManagerThe right-side counterpart ofBothIncrementalNaturalJoinStateManager.removeLeftModifications(io.deephaven.engine.table.ColumnSource<?>[], io.deephaven.engine.rowset.RowSet, io.deephaven.engine.rowset.RowSet, io.deephaven.engine.rowset.RowSetBuilderSequential, io.deephaven.engine.rowset.RowSetBuilderSequential, io.deephaven.engine.table.impl.NaturalJoinModifiedSlotTracker): in a single pass over the modified right rows, determine which rows' key value actually changed, remove those rows from their previous-key hash slots, and report the changed keys. Rows whose key value is unchanged keep their slot.- Specified by:
removeRightModificationsin interfaceBothIncrementalNaturalJoinStateManager- Parameters:
rightSources- the right key sourcesmodifiedPreShift- the modified rows, in pre-shift key space, aligned positionally withmodifiedPostShiftmodifiedPostShift- the modified rows, in post-shift key spacechangedPreShift- output, ascending, receives the pre-shift keys whose key value changed (to be excluded from the caller's shift processing)changedPostShift- output, ascending, receives the post-shift keys whose key value changed (to be re-added by the caller)
-
applyLeftShift
public void applyLeftShift(Context pc, ColumnSource<?>[] leftSources, RowSet shiftedRowSet, long shiftDelta, @NotNull @NotNull NaturalJoinModifiedSlotTracker modifiedSlotTracker) Description copied from interface:BothIncrementalNaturalJoinStateManagerMove the left rows of one shift range within their slots' left row sets.- Specified by:
applyLeftShiftin interfaceBothIncrementalNaturalJoinStateManager- Parameters:
pc- the probe contextleftSources- the left key sourcesshiftedRowSet- the post-shift row keys of the shifted left rowsshiftDelta- the shift range's deltamodifiedSlotTracker- the tracker, whose per-slot builders accumulate the shifted keys of each slot
-
applyRightShift
public void applyRightShift(Context pc, ColumnSource<?>[] rightSources, RowSet shiftedRowSet, long shiftDelta, @NotNull @NotNull NaturalJoinModifiedSlotTracker modifiedSlotTracker) - Specified by:
applyRightShiftin interfaceBothIncrementalNaturalJoinStateManager
-
applyLeftShift
protected abstract void applyLeftShift(RowSequence rowSequence, Chunk[] sourceKeyChunks, NaturalJoinModifiedSlotTracker modifiedSlotTracker) -
makeInitialBuildContext
- Specified by:
makeInitialBuildContextin interfaceBothIncrementalNaturalJoinStateManager
-
decorateLeftSide
public void decorateLeftSide(RowSet leftRowSet, ColumnSource<?>[] leftSources, LongArraySource leftRedirections) - Specified by:
decorateLeftSidein classStaticNaturalJoinStateManager
-
compactAll
public void compactAll()- Specified by:
compactAllin interfaceBothIncrementalNaturalJoinStateManager
-