Package io.trino.operator.join
Class SortedPositionLinks
java.lang.Object
io.trino.operator.join.SortedPositionLinks
- All Implemented Interfaces:
PositionLinks
Maintains position links in sorted order by build side expression.
Then iteration over position links uses set of @{code searchFunctions} which needs to be compatible
with expression used for sorting.
The binary search is used to quickly skip positions which would not match filter function from join condition.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.trino.operator.join.PositionLinks
PositionLinks.Factory -
Method Summary
Modifier and TypeMethodDescriptionbuilder(int size, PagesHashStrategy pagesHashStrategy, it.unimi.dsi.fastutil.longs.LongArrayList addresses) static longgetEstimatedRetainedSizeInBytes(int positionCount) longintIterate over position links.intInitialize iteration over position links.
-
Method Details
-
builder
public static SortedPositionLinks.FactoryBuilder builder(int size, PagesHashStrategy pagesHashStrategy, it.unimi.dsi.fastutil.longs.LongArrayList addresses) -
getSizeInBytes
public long getSizeInBytes()- Specified by:
getSizeInBytesin interfacePositionLinks
-
getEstimatedRetainedSizeInBytes
public static long getEstimatedRetainedSizeInBytes(int positionCount) -
next
Description copied from interface:PositionLinksIterate over position links. When there are no more position -1 is returned.- Specified by:
nextin interfacePositionLinks
-
start
Description copied from interface:PositionLinksInitialize iteration over position links. Returns first potentially eligible join position starting from (and including) position argument.When there are no more position -1 is returned
- Specified by:
startin interfacePositionLinks
-