public class BinaryHashTable extends BaseHybridHashTable
The design of this class follows in many parts the design presented in "Hash joins and hash teams in Microsoft SQL Server", by Goetz Graefe et al. In its current state, the implementation lacks features like dynamic role reversal, partition tuning, or histogram guided partitioning.
buildRowCount, buildSpillRetBufferNumbers, buildSpillReturnBuffers, closed, compressionBlockSize, compressionCodecFactory, compressionEnable, currentEnumerator, currentRecursionDepth, currentSpilledBuildSide, currentSpilledProbeSide, initPartitionFanOut, internalPool, ioManager, LOG, MAX_NUM_PARTITIONS, MAX_RECURSION_DEPTH, numSpillFiles, segmentSize, segmentSizeBits, segmentSizeMask, spillInBytes, totalNumBuffers, tryDistinctBuildRow
Constructor and Description |
---|
BinaryHashTable(Configuration conf,
Object owner,
AbstractRowDataSerializer buildSideSerializer,
AbstractRowDataSerializer probeSideSerializer,
Projection<RowData,BinaryRowData> buildSideProjection,
Projection<RowData,BinaryRowData> probeSideProjection,
MemoryManager memManager,
long reservedMemorySize,
IOManager ioManager,
int avgRecordLen,
long buildRowCount,
boolean useBloomFilters,
HashJoinType type,
JoinCondition condFunc,
boolean reverseJoin,
boolean[] filterNulls,
boolean tryDistinctBuildRow) |
Modifier and Type | Method and Description |
---|---|
void |
clearPartitions()
This method clears all partitions currently residing (partially) in memory.
|
void |
endBuild()
End build phase.
|
RowIterator<BinaryRowData> |
getBuildSideIterator() |
RowData |
getCurrentProbeRow() |
boolean |
nextMatching()
Next record from rebuilt spilled partition or build side outer partition.
|
void |
putBuildRow(RowData row)
Put a build side row to hash table.
|
protected int |
spillPartition()
Selects a partition and spills it.
|
boolean |
tryProbe(RowData record)
Find matched build side rows for a probe row.
|
close, createInputView, ensureNumBuffersReturned, free, freeCurrent, freePages, getNextBuffer, getNextBuffers, getNotNullNextBuffer, getNumSpillFiles, getSpillInBytes, getUsedMemoryInBytes, hash, maxInitBufferOfBucketArea, maxNumPartition, nextSegment, pageSize, readAllBuffers, remainBuffers, returnAll, returnPage
public BinaryHashTable(Configuration conf, Object owner, AbstractRowDataSerializer buildSideSerializer, AbstractRowDataSerializer probeSideSerializer, Projection<RowData,BinaryRowData> buildSideProjection, Projection<RowData,BinaryRowData> probeSideProjection, MemoryManager memManager, long reservedMemorySize, IOManager ioManager, int avgRecordLen, long buildRowCount, boolean useBloomFilters, HashJoinType type, JoinCondition condFunc, boolean reverseJoin, boolean[] filterNulls, boolean tryDistinctBuildRow)
public void putBuildRow(RowData row) throws IOException
IOException
public void endBuild() throws IOException
IOException
public boolean tryProbe(RowData record) throws IOException
IOException
public boolean nextMatching() throws IOException
IOException
public RowData getCurrentProbeRow()
public RowIterator<BinaryRowData> getBuildSideIterator()
public void clearPartitions()
This method is intended for a hard cleanup in the case that the join is aborted.
clearPartitions
in class BaseHybridHashTable
protected int spillPartition() throws IOException
spillPartition
in class BaseHybridHashTable
IOException
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.