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.
  • 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:
      getSizeInBytes in interface PositionLinks
    • getEstimatedRetainedSizeInBytes

      public static long getEstimatedRetainedSizeInBytes(int positionCount)
    • next

      public int next(int position, int probePosition, Page allProbeChannelsPage)
      Description copied from interface: PositionLinks
      Iterate over position links. When there are no more position -1 is returned.
      Specified by:
      next in interface PositionLinks
    • start

      public int start(int startingPosition, int probePosition, Page allProbeChannelsPage)
      Description copied from interface: PositionLinks
      Initialize 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:
      start in interface PositionLinks