public class SimplePagesHashStrategy extends Object implements PagesHashStrategy
| Constructor and Description |
|---|
SimplePagesHashStrategy(List<Type> types,
List<Integer> outputChannels,
List<List<Block>> channels,
List<Integer> hashChannels,
OptionalInt precomputedHashChannel,
Optional<Integer> sortChannel,
FunctionRegistry functionRegistry) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendTo(int blockIndex,
int position,
PageBuilder pageBuilder,
int outputChannelOffset)
Appends all values at the specified position to the page builder starting at
outputChannelOffset. |
int |
compareSortChannelPositions(int leftBlockIndex,
int leftBlockPosition,
int rightBlockIndex,
int rightBlockPosition)
Compares sort channel (if applicable) values at the specified positions.
|
int |
getChannelCount()
Gets the number of columns appended by this PagesHashStrategy.
|
long |
getSizeInBytes()
Get the total of allocated size
|
long |
hashPosition(int blockIndex,
int position)
Calculates the hash code the hashed columns in this PagesHashStrategy at the specified position.
|
long |
hashRow(int position,
Page page)
Calculates the hash code at
position in page. |
boolean |
isPositionNull(int blockIndex,
int blockPosition)
Checks if any of the hashed columns is null
|
boolean |
isSortChannelPositionNull(int blockIndex,
int blockPosition)
Checks if sort channel is null at the specified position
|
boolean |
positionEqualsPosition(int leftBlockIndex,
int leftPosition,
int rightBlockIndex,
int rightPosition)
Compares the hashed columns in this PagesHashStrategy at the specified positions.
|
boolean |
positionEqualsPositionIgnoreNulls(int leftBlockIndex,
int leftPosition,
int rightBlockIndex,
int rightPosition)
Compares the hashed columns in this PagesHashStrategy at the specified positions.
|
boolean |
positionEqualsRow(int leftBlockIndex,
int leftPosition,
int rightPosition,
Page rightPage)
Compares the hashed columns in this PagesHashStrategy to the values in the specified page.
|
boolean |
positionEqualsRow(int leftBlockIndex,
int leftPosition,
int rightPosition,
Page page,
int[] rightHashChannels)
Compares the hashed columns in this PagesHashStrategy to the hashed columns in the Page.
|
boolean |
positionEqualsRowIgnoreNulls(int leftBlockIndex,
int leftPosition,
int rightPosition,
Page rightPage)
Compares the hashed columns in this PagesHashStrategy to the values in the specified page.
|
boolean |
positionNotDistinctFromRow(int leftBlockIndex,
int leftPosition,
int rightPosition,
Page page,
int[] rightChannels)
Compares the hashed columns in this PagesHashStrategy to the hashed columns in the Page.
|
boolean |
rowEqualsRow(int leftPosition,
Page leftPage,
int rightPosition,
Page rightPage)
Compares the values in the specified pages.
|
public int getChannelCount()
PagesHashStrategygetChannelCount in interface PagesHashStrategypublic long getSizeInBytes()
PagesHashStrategygetSizeInBytes in interface PagesHashStrategypublic void appendTo(int blockIndex,
int position,
PageBuilder pageBuilder,
int outputChannelOffset)
PagesHashStrategyoutputChannelOffset.appendTo in interface PagesHashStrategypublic long hashPosition(int blockIndex,
int position)
PagesHashStrategyhashPosition in interface PagesHashStrategypublic long hashRow(int position,
Page page)
PagesHashStrategyposition in page. Page must have the same number of
Blocks as the hashed columns and each entry is expected to be the same type.hashRow in interface PagesHashStrategypublic boolean rowEqualsRow(int leftPosition,
Page leftPage,
int rightPosition,
Page rightPage)
PagesHashStrategyleftPage
and rightPage must have the same number of entries as the hashed columns and each entry
is expected to be the same type.rowEqualsRow in interface PagesHashStrategypublic boolean positionEqualsRow(int leftBlockIndex,
int leftPosition,
int rightPosition,
Page rightPage)
PagesHashStrategyrightPage must have the same number of entries as
the hashed columns and each entry is expected to be the same type.
rightPage is used if join uses filter function and must contain all columns from probe side of join.positionEqualsRow in interface PagesHashStrategypublic boolean positionEqualsRowIgnoreNulls(int leftBlockIndex,
int leftPosition,
int rightPosition,
Page rightPage)
PagesHashStrategyrightPage must have the same number of entries as
the hashed columns and each entry is expected to be the same type.
rightPage is used if join uses filter function and must contain all columns from probe side of join.
This method does not perform any null checks.
positionEqualsRowIgnoreNulls in interface PagesHashStrategypublic boolean positionEqualsRow(int leftBlockIndex,
int leftPosition,
int rightPosition,
Page page,
int[] rightHashChannels)
PagesHashStrategyrightChannels must have the same number of entries as
the hashed columns and each entry is expected to be the same type.positionEqualsRow in interface PagesHashStrategypublic boolean positionNotDistinctFromRow(int leftBlockIndex,
int leftPosition,
int rightPosition,
Page page,
int[] rightChannels)
PagesHashStrategyrightChannels must have the same number of entries as the hashed columns
and each entry is expected to be the same type.positionNotDistinctFromRow in interface PagesHashStrategypublic boolean positionEqualsPosition(int leftBlockIndex,
int leftPosition,
int rightBlockIndex,
int rightPosition)
PagesHashStrategypositionEqualsPosition in interface PagesHashStrategypublic boolean positionEqualsPositionIgnoreNulls(int leftBlockIndex,
int leftPosition,
int rightBlockIndex,
int rightPosition)
PagesHashStrategyThis method does not perform any null checks.
positionEqualsPositionIgnoreNulls in interface PagesHashStrategypublic boolean isPositionNull(int blockIndex,
int blockPosition)
PagesHashStrategyisPositionNull in interface PagesHashStrategypublic int compareSortChannelPositions(int leftBlockIndex,
int leftBlockPosition,
int rightBlockIndex,
int rightBlockPosition)
PagesHashStrategycompareSortChannelPositions in interface PagesHashStrategypublic boolean isSortChannelPositionNull(int blockIndex,
int blockPosition)
PagesHashStrategyisSortChannelPositionNull in interface PagesHashStrategyCopyright © 2012–2019. All rights reserved.