Package io.trino.operator.join
Class SortedPositionLinks
- java.lang.Object
-
- io.trino.operator.join.SortedPositionLinks
-
- All Implemented Interfaces:
PositionLinks
public final class SortedPositionLinks extends Object implements 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 Classes Modifier and Type Class Description static classSortedPositionLinks.FactoryBuilder-
Nested classes/interfaces inherited from interface io.trino.operator.join.PositionLinks
PositionLinks.Factory
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SortedPositionLinks.FactoryBuilderbuilder(int size, PagesHashStrategy pagesHashStrategy, it.unimi.dsi.fastutil.longs.LongArrayList addresses)longgetSizeInBytes()intnext(int position, int probePosition, Page allProbeChannelsPage)Iterate over position links.intstart(int startingPosition, int probePosition, Page allProbeChannelsPage)Initialize iteration over position links.
-
-
-
Method Detail
-
builder
public static SortedPositionLinks.FactoryBuilder builder(int size, PagesHashStrategy pagesHashStrategy, it.unimi.dsi.fastutil.longs.LongArrayList addresses)
-
next
public int next(int position, int probePosition, Page allProbeChannelsPage)Description copied from interface:PositionLinksIterate over position links. When there are no more position -1 is returned.- Specified by:
nextin interfacePositionLinks
-
start
public int start(int startingPosition, int probePosition, Page allProbeChannelsPage)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
-
getSizeInBytes
public long getSizeInBytes()
- Specified by:
getSizeInBytesin interfacePositionLinks
-
-