Package io.trino.operator
Interface PagesHashStrategy
- All Known Implementing Classes:
SimplePagesHashStrategy
public interface PagesHashStrategy
-
Method Summary
Modifier and TypeMethodDescriptionvoidappendTo(int blockIndex, int position, PageBuilder pageBuilder, int outputChannelOffset) Appends all values at the specified position to the page builder starting atoutputChannelOffset.intcompareSortChannelPositions(int leftBlockIndex, int leftBlockPosition, int rightBlockIndex, int rightBlockPosition) Compares sort channel (if applicable) values at the specified positions.intGets the number of columns appended by this PagesHashStrategy.longGet the total of allocated sizelonghashPosition(int blockIndex, int position) Calculates the hash code the hashed columns in this PagesHashStrategy at the specified position.longCalculates the hash code atpositioninpage.booleanisPositionNull(int blockIndex, int blockPosition) Checks if any of the hashed columns is nullbooleanisSortChannelPositionNull(int blockIndex, int blockPosition) Checks if sort channel is null at the specified positionbooleanpositionEqualsPosition(int leftBlockIndex, int leftPosition, int rightBlockIndex, int rightPosition) Compares the hashed columns in this PagesHashStrategy at the specified positions.booleanpositionEqualsPositionIgnoreNulls(int leftBlockIndex, int leftPosition, int rightBlockIndex, int rightPosition) Compares the hashed columns in this PagesHashStrategy at the specified positions.booleanpositionEqualsRow(int leftBlockIndex, int leftPosition, int rightPosition, Page rightPage) Compares the hashed columns in this PagesHashStrategy to the values in the specified page.booleanpositionEqualsRowIgnoreNulls(int leftBlockIndex, int leftPosition, int rightPosition, Page rightPage) Compares the hashed columns in this PagesHashStrategy to the values in the specified page.booleanpositionNotDistinctFromPosition(int leftBlockIndex, int leftPosition, int rightBlockIndex, int rightPosition) Compares the hashed columns in this PagesHashStrategy at the specified positions.booleanpositionNotDistinctFromRow(int leftBlockIndex, int leftPosition, int rightPosition, Page rightPage) Compares the hashed columns in this PagesHashStrategy to the values in the specified page.booleanpositionNotDistinctFromRow(int leftBlockIndex, int leftPosition, int rightPosition, Page page, int[] rightChannels) Compares the hashed columns in this PagesHashStrategy to the hashed columns in the Page.booleanrowEqualsRow(int leftPosition, Page leftPage, int rightPosition, Page rightPage) Compares the values in the specified pages.booleanrowNotDistinctFromRow(int leftPosition, Page leftPage, int rightPosition, Page rightPage) Compares the values in the specified pages.
-
Method Details
-
getChannelCount
int getChannelCount()Gets the number of columns appended by this PagesHashStrategy. -
getSizeInBytes
long getSizeInBytes()Get the total of allocated size -
appendTo
Appends all values at the specified position to the page builder starting atoutputChannelOffset. -
hashPosition
long hashPosition(int blockIndex, int position) Calculates the hash code the hashed columns in this PagesHashStrategy at the specified position. -
hashRow
Calculates the hash code atpositioninpage. Page must have the same number of Blocks as the hashed columns and each entry is expected to be the same type. -
rowEqualsRow
Compares the values in the specified pages. The values are compared positionally, soleftPageandrightPagemust have the same number of entries as the hashed columns and each entry is expected to be the same type. -
rowNotDistinctFromRow
Compares the values in the specified pages. The values are compared positionally, soleftPageandrightPagemust have the same number of entries as the hashed columns and each entry is expected to be the same type. The values are compared under "not distinct from" semantics. -
positionEqualsRow
Compares the hashed columns in this PagesHashStrategy to the values in the specified page. The values are compared positionally, sorightPagemust have the same number of entries as the hashed columns and each entry is expected to be the same type.rightPageis used if join uses filter function and must contain all columns from probe side of join. -
positionNotDistinctFromRow
boolean positionNotDistinctFromRow(int leftBlockIndex, int leftPosition, int rightPosition, Page rightPage) Compares the hashed columns in this PagesHashStrategy to the values in the specified page. The values are compared positionally, sorightPagemust have the same number of entries as the hashed columns and each entry is expected to be the same type.rightPageis used if join uses filter function and must contain all columns from probe side of join. The values are compared under "not distinct from" semantics. -
positionEqualsRowIgnoreNulls
boolean positionEqualsRowIgnoreNulls(int leftBlockIndex, int leftPosition, int rightPosition, Page rightPage) Compares the hashed columns in this PagesHashStrategy to the values in the specified page. The values are compared positionally, sorightPagemust have the same number of entries as the hashed columns and each entry is expected to be the same type.rightPageis used if join uses filter function and must contain all columns from probe side of join.This method does not perform any null checks.
-
positionNotDistinctFromRow
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. The values are compared positionally under "not distinct from" semantics.rightChannelsmust have the same number of entries as the hashed columns and each entry is expected to be the same type. -
positionEqualsPosition
boolean positionEqualsPosition(int leftBlockIndex, int leftPosition, int rightBlockIndex, int rightPosition) Compares the hashed columns in this PagesHashStrategy at the specified positions. -
positionNotDistinctFromPosition
boolean positionNotDistinctFromPosition(int leftBlockIndex, int leftPosition, int rightBlockIndex, int rightPosition) Compares the hashed columns in this PagesHashStrategy at the specified positions. The values are compared under "not distinct from" semantics. -
positionEqualsPositionIgnoreNulls
boolean positionEqualsPositionIgnoreNulls(int leftBlockIndex, int leftPosition, int rightBlockIndex, int rightPosition) Compares the hashed columns in this PagesHashStrategy at the specified positions.This method does not perform any null checks.
-
isPositionNull
boolean isPositionNull(int blockIndex, int blockPosition) Checks if any of the hashed columns is null -
compareSortChannelPositions
int compareSortChannelPositions(int leftBlockIndex, int leftBlockPosition, int rightBlockIndex, int rightBlockPosition) Compares sort channel (if applicable) values at the specified positions. -
isSortChannelPositionNull
boolean isSortChannelPositionNull(int blockIndex, int blockPosition) Checks if sort channel is null at the specified position
-