Class StaticMultiJoinStateManagerTypedBase
java.lang.Object
io.deephaven.engine.table.impl.multijoin.StaticMultiJoinStateManagerTypedBase
- All Implemented Interfaces:
MultiJoinStateManager
public abstract class StaticMultiJoinStateManagerTypedBase
extends Object
implements MultiJoinStateManager
-
Field Summary
Modifier and TypeFieldDescriptionprotected final ChunkType[]
The keys for our hash entries.static final int
protected final ColumnSource<?>[]
protected final WritableColumnSource<?>[]
static final long
protected int
The number of entries in our hash table in use.protected final WritableColumnSource[]
The output sources representing the keys of our joined table.protected ImmutableIntArraySource
Store sentinel information and maps hash slots to output row keys.protected int
The number of slots in our hash table. -
Constructor Summary
ModifierConstructorDescriptionprotected
StaticMultiJoinStateManagerTypedBase
(ColumnSource<?>[] tableKeySources, ColumnSource<?>[] keySourcesForErrorMessages, int tableSize, double maximumLoadFactor) -
Method Summary
Modifier and TypeMethodDescriptionvoid
build
(Table table, ColumnSource<?>[] keySources, int tableNumber) Add the given table to this multiJoin result.protected abstract void
buildFromTable
(RowSequence rowSequence, Chunk<Values>[] sourceKeyChunks, LongArraySource tableRedirSource, long tableNumber) protected void
buildTable
(TypedHasherUtil.BuildOrProbeContext.BuildContext bc, RowSequence buildRows, ColumnSource<?>[] buildSources, TypedHasherUtil.BuildHandler buildHandler) void
doRehash
(int nextChunkSize) void
ensureTableCapacity
(int tables) Ensure that this state manager can handlenumTables
tables as constituents of the multiJoin.ColumnSource<?>[]
Get the hash table column sources for the result table.long
Get the number of rows in the result tablegetRowRedirectionForTable
(int tableNumber) Get the resultrow redirection
for a given tableprotected int
hashToTableLocation
(int hash) protected String
produce a pretty key for error messages.protected abstract void
rehashInternalFull
(int oldSize) boolean
rehashRequired
(int nextChunkSize) void
setMaximumLoadFactor
(double maximumLoadFactor) void
setTargetLoadFactor
(double targetLoadFactor)
-
Field Details
-
keySourcesForErrorMessages
-
NO_REDIRECTION
public static final long NO_REDIRECTION- See Also:
-
EMPTY_OUTPUT_ROW
public static final int EMPTY_OUTPUT_ROW- See Also:
-
tableSize
protected int tableSizeThe number of slots in our hash table. -
numEntries
protected int numEntriesThe number of entries in our hash table in use. -
chunkTypes
The keys for our hash entries. -
mainKeySources
-
outputKeySources
The output sources representing the keys of our joined table. -
slotToOutputRow
Store sentinel information and maps hash slots to output row keys.
-
-
Constructor Details
-
StaticMultiJoinStateManagerTypedBase
protected StaticMultiJoinStateManagerTypedBase(ColumnSource<?>[] tableKeySources, ColumnSource<?>[] keySourcesForErrorMessages, int tableSize, double maximumLoadFactor)
-
-
Method Details
-
build
Description copied from interface:MultiJoinStateManager
Add the given table to this multiJoin result.- Specified by:
build
in interfaceMultiJoinStateManager
- Parameters:
table
- the table to addkeySources
- the column sources that contain the keystableNumber
- the table number for which we are adding rows
-
buildFromTable
protected abstract void buildFromTable(RowSequence rowSequence, Chunk<Values>[] sourceKeyChunks, LongArraySource tableRedirSource, long tableNumber) -
buildTable
protected void buildTable(TypedHasherUtil.BuildOrProbeContext.BuildContext bc, RowSequence buildRows, ColumnSource<?>[] buildSources, TypedHasherUtil.BuildHandler buildHandler) -
doRehash
public void doRehash(int nextChunkSize) -
rehashRequired
public boolean rehashRequired(int nextChunkSize) -
rehashInternalFull
protected abstract void rehashInternalFull(int oldSize) -
hashToTableLocation
protected int hashToTableLocation(int hash) -
keyString
produce a pretty key for error messages. -
getResultSize
public long getResultSize()Description copied from interface:MultiJoinStateManager
Get the number of rows in the result table- Specified by:
getResultSize
in interfaceMultiJoinStateManager
- Returns:
- the number of rows in the result table
-
getKeyHashTableSources
Description copied from interface:MultiJoinStateManager
Get the hash table column sources for the result table. These are used as the key columns of our result.- Specified by:
getKeyHashTableSources
in interfaceMultiJoinStateManager
-
getRowRedirectionForTable
Description copied from interface:MultiJoinStateManager
Get the resultrow redirection
for a given table- Specified by:
getRowRedirectionForTable
in interfaceMultiJoinStateManager
- Parameters:
tableNumber
- the table to fetch- Returns:
- the row redirection for the table
-
ensureTableCapacity
public void ensureTableCapacity(int tables) Description copied from interface:MultiJoinStateManager
Ensure that this state manager can handlenumTables
tables as constituents of the multiJoin.- Specified by:
ensureTableCapacity
in interfaceMultiJoinStateManager
- Parameters:
tables
- the number of tables that participate
-
setTargetLoadFactor
public void setTargetLoadFactor(double targetLoadFactor) - Specified by:
setTargetLoadFactor
in interfaceMultiJoinStateManager
-
setMaximumLoadFactor
public void setMaximumLoadFactor(double maximumLoadFactor) - Specified by:
setMaximumLoadFactor
in interfaceMultiJoinStateManager
-