Class RightIncrementalHashedAsOfJoinStateManager
java.lang.Object
io.deephaven.engine.table.impl.RightIncrementalAsOfJoinStateManager
io.deephaven.engine.table.impl.asofjoin.RightIncrementalHashedAsOfJoinStateManager
- Direct Known Subclasses:
RightIncrementalAsOfJoinStateManagerTypedBase
public abstract class RightIncrementalHashedAsOfJoinStateManager
extends RightIncrementalAsOfJoinStateManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final byteFields inherited from class io.deephaven.engine.table.impl.RightIncrementalAsOfJoinStateManager
keySourcesForErrorMessages -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRightIncrementalHashedAsOfJoinStateManager(ColumnSource<?>[] keySourcesForErrorMessages) -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddTombstoneCandidate(int slot) Record a slot whose left or right side may have become empty during this cycle, so thatreleaseEmptyBuckets()can release it.protected voidaddToSequentialBuilder(long slot, @NotNull ObjectArraySource<RowSetBuilderSequential> sequentialBuilders, long indexKey) abstract intbuildAdditions(boolean isLeftSide, RowSet additions, ColumnSource<?>[] sources, IntegerArraySource slots, ObjectArraySource<RowSetBuilderSequential> sequentialBuilders) abstract intbuildFromLeftSide(RowSequence leftRowSet, ColumnSource<?>[] leftSources, @NotNull IntegerArraySource addedSlots) abstract intbuildFromRightSide(RowSequence rightRowSet, ColumnSource<?>[] rightSources, @NotNull IntegerArraySource addedSlots, int usedSlots) abstract voidensureTombstoneCandidateCapacity(int additionalCandidates) Reserve room foradditionalCandidatesmore calls toaddTombstoneCandidate(int)in this cycle.abstract intgatherModifications(RowSet restampAdditions, ColumnSource<?>[] sources, IntegerArraySource slots, ObjectArraySource<RowSetBuilderSequential> sequentialBuilders) abstract intgatherShiftRowSet(RowSet restampAdditions, ColumnSource<?>[] sources, IntegerArraySource slots, ObjectArraySource<RowSetBuilderSequential> sequentialBuilders) abstract intgatherShiftRowSet(Context probeContext, RowSet rowSet, ColumnSource<?>[] sources, IntegerArraySource slots, ObjectArraySource<RowSetBuilderSequential> sequentialBuilders) Gather the rows ofrowSetby slot, asgatherShiftRowSet(RowSet, ColumnSource[], IntegerArraySource, ObjectArraySource)does, reusing a context frommakeProbeContext(io.deephaven.engine.table.ColumnSource<?>[], long)so that a caller probing many row sets in one cycle allocates it once.abstract WritableRowSetgetAndClearLeftRowSet(int slot) abstract WritableRowSetgetLeftRowSet(int slot) abstract SegmentedSortedArraygetLeftSsa(int slot) abstract SegmentedSortedArraygetLeftSsa(int slot, Function<RowSet, SegmentedSortedArray> ssaFactory) abstract SegmentedSortedArraygetLeftSsaOrRowSet(int slot, org.apache.commons.lang3.mutable.MutableObject<WritableRowSet> indexOutput) abstract longThe number of live buckets, which bounds the number of distinct slots any probe can report and therefore the capacity the per-slot output arrays need.protected bytegetRightEntryType(byte entryType) abstract WritableRowSetgetRightRowSet(int slot) abstract SegmentedSortedArraygetRightSsa(int slot) abstract SegmentedSortedArraygetRightSsa(int slot, Function<RowSet, SegmentedSortedArray> ssaFactory) abstract SegmentedSortedArraygetRightSsaOrRowSet(int slot, org.apache.commons.lang3.mutable.MutableObject<WritableRowSet> indexOutput) abstract bytegetState(int slot) abstract intprotected byteleftEntryAsRightType(byte entryType) abstract ContextmakeProbeContext(ColumnSource<?>[] probeSources, long maxSize) Make a probe context forgatherShiftRowSet(Context, RowSet, ColumnSource[], IntegerArraySource, ObjectArraySource).abstract intmarkForRemoval(RowSet restampRemovals, ColumnSource<?>[] sources, IntegerArraySource slots, ObjectArraySource<RowSetBuilderSequential> sequentialBuilders) abstract voidpopulateLeftRowSetsFromIndexTable(IntegerArraySource slots, int slotCount, ColumnSource<RowSet> rowSetSource) abstract voidpopulateRightRowSetsFromIndexTable(IntegerArraySource slots, int slotCount, ColumnSource<RowSet> rowSetSource) abstract intprobeAdditions(RowSet restampAdditions, ColumnSource<?>[] sources, IntegerArraySource slots, ObjectArraySource<RowSetBuilderSequential> sequentialBuilders) abstract voidprobeRightInitial(RowSequence rowsToProbe, ColumnSource<?>[] rightSources) abstract voidRelease every candidate bucket whose left and right sides are both empty, replacing it with a tombstone that a later build may reuse.abstract voidsetLeftRowSet(int slot, RowSet rowSet) abstract voidsetRightRowSet(int slot, RowSet rowSet) Methods inherited from class io.deephaven.engine.table.impl.RightIncrementalAsOfJoinStateManager
extractKeyStringFromSourceTable
-
Field Details
-
ENTRY_RIGHT_MASK
public static final byte ENTRY_RIGHT_MASK- See Also:
-
ENTRY_RIGHT_IS_EMPTY
public static final byte ENTRY_RIGHT_IS_EMPTY- See Also:
-
ENTRY_RIGHT_IS_BUILDER
public static final byte ENTRY_RIGHT_IS_BUILDER- See Also:
-
ENTRY_RIGHT_IS_SSA
public static final byte ENTRY_RIGHT_IS_SSA- See Also:
-
ENTRY_RIGHT_IS_ROWSET
public static final byte ENTRY_RIGHT_IS_ROWSET- See Also:
-
ENTRY_LEFT_MASK
public static final byte ENTRY_LEFT_MASK- See Also:
-
ENTRY_LEFT_IS_EMPTY
public static final byte ENTRY_LEFT_IS_EMPTY- See Also:
-
ENTRY_LEFT_IS_BUILDER
public static final byte ENTRY_LEFT_IS_BUILDER- See Also:
-
ENTRY_LEFT_IS_SSA
public static final byte ENTRY_LEFT_IS_SSA- See Also:
-
ENTRY_LEFT_IS_ROWSET
public static final byte ENTRY_LEFT_IS_ROWSET- See Also:
-
-
Constructor Details
-
RightIncrementalHashedAsOfJoinStateManager
-
-
Method Details
-
addToSequentialBuilder
protected void addToSequentialBuilder(long slot, @NotNull @NotNull ObjectArraySource<RowSetBuilderSequential> sequentialBuilders, long indexKey) -
getNumEntries
public abstract long getNumEntries()The number of live buckets, which bounds the number of distinct slots any probe can report and therefore the capacity the per-slot output arrays need. A bucket released byreleaseEmptyBuckets()is not counted.- Returns:
- the number of live buckets this manager holds
-
ensureTombstoneCandidateCapacity
public abstract void ensureTombstoneCandidateCapacity(int additionalCandidates) Reserve room foradditionalCandidatesmore calls toaddTombstoneCandidate(int)in this cycle.- Parameters:
additionalCandidates- the number of candidates that may be added
-
addTombstoneCandidate
public abstract void addTombstoneCandidate(int slot) Record a slot whose left or right side may have become empty during this cycle, so thatreleaseEmptyBuckets()can release it. Room for the candidate must already have been reserved withensureTombstoneCandidateCapacity(int).- Parameters:
slot- the slot, as reported by a build or probe of this cycle
-
releaseEmptyBuckets
public abstract void releaseEmptyBuckets()Release every candidate bucket whose left and right sides are both empty, replacing it with a tombstone that a later build may reuse. The slot numbers reported by this cycle's builds and probes must no longer be in use, as a released slot may hold a different key after the next build. -
leftEntryAsRightType
protected byte leftEntryAsRightType(byte entryType) -
getRightEntryType
protected byte getRightEntryType(byte entryType) -
buildFromLeftSide
public abstract int buildFromLeftSide(RowSequence leftRowSet, ColumnSource<?>[] leftSources, @NotNull @NotNull IntegerArraySource addedSlots) -
buildFromRightSide
public abstract int buildFromRightSide(RowSequence rightRowSet, ColumnSource<?>[] rightSources, @NotNull @NotNull IntegerArraySource addedSlots, int usedSlots) -
probeRightInitial
-
probeAdditions
public abstract int probeAdditions(RowSet restampAdditions, ColumnSource<?>[] sources, IntegerArraySource slots, ObjectArraySource<RowSetBuilderSequential> sequentialBuilders) -
buildAdditions
public abstract int buildAdditions(boolean isLeftSide, RowSet additions, ColumnSource<?>[] sources, IntegerArraySource slots, ObjectArraySource<RowSetBuilderSequential> sequentialBuilders) -
getRightSsa
-
getRightSsa
public abstract SegmentedSortedArray getRightSsa(int slot, Function<RowSet, SegmentedSortedArray> ssaFactory) -
getLeftSsa
-
getLeftSsa
public abstract SegmentedSortedArray getLeftSsa(int slot, Function<RowSet, SegmentedSortedArray> ssaFactory) -
getLeftSsaOrRowSet
public abstract SegmentedSortedArray getLeftSsaOrRowSet(int slot, org.apache.commons.lang3.mutable.MutableObject<WritableRowSet> indexOutput) -
getRightSsaOrRowSet
public abstract SegmentedSortedArray getRightSsaOrRowSet(int slot, org.apache.commons.lang3.mutable.MutableObject<WritableRowSet> indexOutput) -
setRightRowSet
-
setLeftRowSet
-
getLeftRowSet
-
getRightRowSet
-
populateRightRowSetsFromIndexTable
public abstract void populateRightRowSetsFromIndexTable(IntegerArraySource slots, int slotCount, ColumnSource<RowSet> rowSetSource) -
populateLeftRowSetsFromIndexTable
public abstract void populateLeftRowSetsFromIndexTable(IntegerArraySource slots, int slotCount, ColumnSource<RowSet> rowSetSource) -
getAndClearLeftRowSet
-
markForRemoval
public abstract int markForRemoval(RowSet restampRemovals, ColumnSource<?>[] sources, IntegerArraySource slots, ObjectArraySource<RowSetBuilderSequential> sequentialBuilders) -
gatherShiftRowSet
public abstract int gatherShiftRowSet(RowSet restampAdditions, ColumnSource<?>[] sources, IntegerArraySource slots, ObjectArraySource<RowSetBuilderSequential> sequentialBuilders) -
makeProbeContext
Make a probe context forgatherShiftRowSet(Context, RowSet, ColumnSource[], IntegerArraySource, ObjectArraySource).- Parameters:
probeSources- the key sources that will be probedmaxSize- the largest row set that will be probed with the context- Returns:
- a context the caller must close
-
gatherShiftRowSet
public abstract int gatherShiftRowSet(Context probeContext, RowSet rowSet, ColumnSource<?>[] sources, IntegerArraySource slots, ObjectArraySource<RowSetBuilderSequential> sequentialBuilders) Gather the rows ofrowSetby slot, asgatherShiftRowSet(RowSet, ColumnSource[], IntegerArraySource, ObjectArraySource)does, reusing a context frommakeProbeContext(io.deephaven.engine.table.ColumnSource<?>[], long)so that a caller probing many row sets in one cycle allocates it once. -
gatherModifications
public abstract int gatherModifications(RowSet restampAdditions, ColumnSource<?>[] sources, IntegerArraySource slots, ObjectArraySource<RowSetBuilderSequential> sequentialBuilders) -
getState
public abstract byte getState(int slot) -
getTableSize
public abstract int getTableSize()
-