Package io.deephaven.engine.table.impl
Interface BothIncrementalNaturalJoinStateManager
- All Superinterfaces:
IncrementalNaturalJoinStateManager
- All Known Implementing Classes:
IncrementalNaturalJoinStateManagerTypedBase
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface -
Field Summary
Fields inherited from interface io.deephaven.engine.table.impl.IncrementalNaturalJoinStateManager
EMPTY_RIGHT_STATE, FIRST_DUPLICATE, TOMBSTONE_RIGHT_STATE -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLeftSide(Context bc, RowSequence leftIndex, ColumnSource<?>[] leftSources, LongArraySource leftRedirections, NaturalJoinModifiedSlotTracker modifiedSlotTracker, boolean addedToTable) Add left rows to their key's slots, storing each row's right redirection (by position) inleftRedirections.voidaddRightSide(Context bc, RowSequence rightIndex, ColumnSource<?>[] rightSources, @NotNull 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.voidapplyRightShift(Context pc, ColumnSource<?>[] rightSources, RowSet shiftedRowSet, long shiftDelta, @NotNull NaturalJoinModifiedSlotTracker modifiedSlotTracker) 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) voidvoiddecorateLeftSide(RowSet leftRowSet, ColumnSource<?>[] leftSources, BothIncrementalNaturalJoinStateManager.InitialBuildContext ibc) makeBuildContext(ColumnSource<?>[] buildSources, long maxSize) makeProbeContext(ColumnSource<?>[] probeSources, long maxSize) voidmodifyByRight(Context pc, RowSet modified, ColumnSource<?>[] rightSources, @NotNull 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.voidremoveRight(Context pc, RowSequence rightIndex, ColumnSource<?>[] rightSources, @NotNull NaturalJoinModifiedSlotTracker modifiedSlotTracker) voidremoveRightModifications(ColumnSource<?>[] rightSources, RowSet modifiedPreShift, RowSet modifiedPostShift, RowSetBuilderSequential changedPreShift, RowSetBuilderSequential changedPostShift, NaturalJoinModifiedSlotTracker modifiedSlotTracker) The right-side counterpart ofremoveLeftModifications(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.Methods inherited from interface io.deephaven.engine.table.impl.IncrementalNaturalJoinStateManager
addRightRowKeyToDuplicates, checkExactMatch, duplicateCreationChangesState, getLeftRowSet, getRightRowKey, getRightRowKeyFromDuplicates, getRightRowSet, keyString, removeRightRowKeyFromDuplicates, shiftOneKey
-
Method Details
-
makeInitialBuildContext
BothIncrementalNaturalJoinStateManager.InitialBuildContext makeInitialBuildContext() -
buildFromRightSide
-
decorateLeftSide
void decorateLeftSide(RowSet leftRowSet, ColumnSource<?>[] leftSources, BothIncrementalNaturalJoinStateManager.InitialBuildContext ibc) -
compactAll
void compactAll() -
buildIndexedRowRedirection
WritableRowRedirection buildIndexedRowRedirection(QueryTable leftTable, BothIncrementalNaturalJoinStateManager.InitialBuildContext ibc, ColumnSource<RowSet> indexRowSets, JoinControl.RedirectionType redirectionType) -
buildRowRedirectionFromRedirections
WritableRowRedirection buildRowRedirectionFromRedirections(QueryTable leftTable, BothIncrementalNaturalJoinStateManager.InitialBuildContext ibc, JoinControl.RedirectionType redirectionType) -
makeProbeContext
-
makeBuildContext
-
addRightSide
void addRightSide(Context bc, RowSequence rightIndex, ColumnSource<?>[] rightSources, @NotNull @NotNull NaturalJoinModifiedSlotTracker modifiedSlotTracker) -
removeRight
void removeRight(Context pc, RowSequence rightIndex, ColumnSource<?>[] rightSources, @NotNull @NotNull NaturalJoinModifiedSlotTracker modifiedSlotTracker) -
modifyByRight
void modifyByRight(Context pc, RowSet modified, ColumnSource<?>[] rightSources, @NotNull @NotNull NaturalJoinModifiedSlotTracker modifiedSlotTracker) -
applyRightShift
void applyRightShift(Context pc, ColumnSource<?>[] rightSources, RowSet shiftedRowSet, long shiftDelta, @NotNull @NotNull NaturalJoinModifiedSlotTracker modifiedSlotTracker) -
addLeftSide
void addLeftSide(Context bc, RowSequence leftIndex, ColumnSource<?>[] leftSources, LongArraySource leftRedirections, NaturalJoinModifiedSlotTracker modifiedSlotTracker, boolean addedToTable) Add left rows to their key's slots, storing each row's right redirection (by position) inleftRedirections.- Parameters:
bc- the build contextleftIndex- 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
-
removeLeft
void removeLeft(Context pc, RowSequence leftIndex, ColumnSource<?>[] leftSources, NaturalJoinModifiedSlotTracker modifiedSlotTracker) -
applyLeftShift
void applyLeftShift(Context pc, ColumnSource<?>[] leftSources, RowSet shiftedRowSet, long shiftDelta, @NotNull @NotNull NaturalJoinModifiedSlotTracker modifiedSlotTracker) Move the left rows of one shift range within their slots' left row sets.- 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
-
removeLeftModifications
void removeLeftModifications(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. 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.- 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)
-
removeRightModifications
void removeRightModifications(ColumnSource<?>[] rightSources, RowSet modifiedPreShift, RowSet modifiedPostShift, RowSetBuilderSequential changedPreShift, RowSetBuilderSequential changedPostShift, NaturalJoinModifiedSlotTracker modifiedSlotTracker) The right-side counterpart ofremoveLeftModifications(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.- 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)
-