Package io.deephaven.engine.table.impl
Interface IncrementalNaturalJoinStateManager
- All Known Subinterfaces:
BothIncrementalNaturalJoinStateManager
- All Known Implementing Classes:
IncrementalNaturalJoinStateManagerTypedBase,RightIncrementalNaturalJoinStateManager,RightIncrementalNaturalJoinStateManagerTypedBase
public interface IncrementalNaturalJoinStateManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longThe right state of a hash slot that has never held a key.static final longRight states at or below this value encode a location in the right-side duplicate row sets:FIRST_DUPLICATEmaps to location 0,FIRST_DUPLICATE - 1to location 1, and so on.static final longThe right state of a hash slot whose key was deleted (only produced by the both-incremental state manager). -
Method Summary
Modifier and TypeMethodDescriptiondefault longaddRightRowKeyToDuplicates(WritableRowSet duplicates, long keyToRemove, NaturalJoinType joinType) Add a key to the RHS duplicates, return the appropriate row key from this set *AFTER* the addition.voidcheckExactMatch(long leftKeyIndex, long rightSide) default booleanduplicateCreationChangesState(WritableRowSet duplicates, long existingRightRowKey, NaturalJoinType joinType) Whether turning a slot's single right row into a duplicate set changes what its left rows must observe.getLeftRowSet(int slot) longgetRightRowKey(int slot) default longgetRightRowKeyFromDuplicates(WritableRowSet duplicates, NaturalJoinType joinType) Given the join type, return the correct row key from the set of RHS duplicates.getRightRowSet(int slot) static booleanisDuplicateRightState(long rightState) keyString(int slot) default longremoveRightRowKeyFromDuplicates(WritableRowSet duplicates, long keyToRemove, NaturalJoinType joinType) Remove the key from the RHS duplicates, return the appropriate row key from this set *BEFORE* the removal.default voidshiftOneKey(WritableRowSet duplicates, long shiftedKey, long shiftDelta) Shift a key in the RHS duplicate row set.
-
Field Details
-
EMPTY_RIGHT_STATE
static final long EMPTY_RIGHT_STATEThe right state of a hash slot that has never held a key.- See Also:
-
TOMBSTONE_RIGHT_STATE
static final long TOMBSTONE_RIGHT_STATEThe right state of a hash slot whose key was deleted (only produced by the both-incremental state manager).- See Also:
-
FIRST_DUPLICATE
static final long FIRST_DUPLICATERight states at or below this value encode a location in the right-side duplicate row sets:FIRST_DUPLICATEmaps to location 0,FIRST_DUPLICATE - 1to location 1, and so on. A right state above this value is a single right row key,RowSequence.NULL_ROW_KEYfor a key with no right row, or the tombstone.- See Also:
-
-
Method Details
-
isDuplicateRightState
static boolean isDuplicateRightState(long rightState) - Parameters:
rightState- a right state as stored in a hash slot- Returns:
- whether the state encodes a duplicate row set location, rather than a row key or one of the no-right-row
markers (
RowSequence.NULL_ROW_KEY,TOMBSTONE_RIGHT_STATE,EMPTY_RIGHT_STATE)
-
getRightRowKey
long getRightRowKey(int slot) -
getRightRowSet
-
getLeftRowSet
-
keyString
-
checkExactMatch
void checkExactMatch(long leftKeyIndex, long rightSide) -
getRightRowKeyFromDuplicates
Given the join type, return the correct row key from the set of RHS duplicates. -
duplicateCreationChangesState
default boolean duplicateCreationChangesState(WritableRowSet duplicates, long existingRightRowKey, NaturalJoinType joinType) Whether turning a slot's single right row into a duplicate set changes what its left rows must observe. The join types that reject duplicates must record the slot so the error is raised while processing the modified slots; the others only when the newly selected right row differs from the one the left rows already hold.- Parameters:
duplicates- the duplicate set, after the new key has been addedexistingRightRowKey- the slot's right row key before the duplicate set was createdjoinType- the join type- Returns:
- whether the slot must be recorded as changed in the modified slot tracker
-
addRightRowKeyToDuplicates
default long addRightRowKeyToDuplicates(WritableRowSet duplicates, long keyToRemove, NaturalJoinType joinType) Add a key to the RHS duplicates, return the appropriate row key from this set *AFTER* the addition. -
removeRightRowKeyFromDuplicates
default long removeRightRowKeyFromDuplicates(WritableRowSet duplicates, long keyToRemove, NaturalJoinType joinType) Remove the key from the RHS duplicates, return the appropriate row key from this set *BEFORE* the removal. -
shiftOneKey
Shift a key in the RHS duplicate row set.
-