Class DefaultPagesHash

java.lang.Object
io.trino.operator.join.DefaultPagesHash
All Implemented Interfaces:
PagesHash

public final class DefaultPagesHash extends Object implements PagesHash
The PagesHash object that handles all cases - single/multi channel joins with any types. This implementation assumes arrays used in the hash are always a power of 2
  • Constructor Details

  • Method Details

    • getPositionCount

      public int getPositionCount()
      Specified by:
      getPositionCount in interface PagesHash
    • getInMemorySizeInBytes

      public long getInMemorySizeInBytes()
      Specified by:
      getInMemorySizeInBytes in interface PagesHash
    • getAddressIndex

      public int getAddressIndex(int position, Page hashChannelsPage)
      Specified by:
      getAddressIndex in interface PagesHash
    • getAddressIndex

      public int getAddressIndex(int rightPosition, Page hashChannelsPage, long rawHash)
      Specified by:
      getAddressIndex in interface PagesHash
    • getAddressIndex

      public int[] getAddressIndex(int[] positions, Page hashChannelsPage)
      Specified by:
      getAddressIndex in interface PagesHash
    • getAddressIndex

      public int[] getAddressIndex(int[] positions, Page hashChannelsPage, long[] rawHashes)
      Specified by:
      getAddressIndex in interface PagesHash
    • appendTo

      public void appendTo(long position, PageBuilder pageBuilder, int outputChannelOffset)
      Specified by:
      appendTo in interface PagesHash
    • getEstimatedRetainedSizeInBytes

      public static long getEstimatedRetainedSizeInBytes(int positionCount, HashArraySizeSupplier hashArraySizeSupplier, it.unimi.dsi.fastutil.longs.LongArrayList addresses, List<it.unimi.dsi.fastutil.objects.ObjectArrayList<Block>> channels, long blocksSizeInBytes)