Class RowPositionsAppender

java.lang.Object
io.trino.operator.output.RowPositionsAppender
All Implemented Interfaces:
PositionsAppender

public class RowPositionsAppender extends Object implements PositionsAppender
  • Method Details

    • createRowAppender

      public static RowPositionsAppender createRowAppender(PositionsAppenderFactory positionsAppenderFactory, RowType type, int expectedPositions, long maxPageSizeInBytes)
    • append

      public void append(it.unimi.dsi.fastutil.ints.IntArrayList positions, Block block)
      Specified by:
      append in interface PositionsAppender
    • appendRle

      public void appendRle(Block value, int rlePositionCount)
      Description copied from interface: PositionsAppender
      Appends the specified value positionCount times. The result is the same as with using PositionsAppender.append(IntArrayList, Block) with positions list [0...positionCount -1] but with possible performance optimizations.
      Specified by:
      appendRle in interface PositionsAppender
    • append

      public void append(int position, Block value)
      Description copied from interface: PositionsAppender
      Appends single position. The implementation must be conceptually equal to append(IntArrayList.wrap(new int[] {position}), source) but may be optimized. Caller should avoid using this method if PositionsAppender.append(IntArrayList, Block) can be used as appending positions one by one can be significantly slower and may not support features like pushing RLE through the appender.
      Specified by:
      append in interface PositionsAppender
    • build

      public Block build()
      Description copied from interface: PositionsAppender
      Creates the block from the appender data. After this, appender is reset to the initial state, and it is ready to build a new block.
      Specified by:
      build in interface PositionsAppender
    • getRetainedSizeInBytes

      public long getRetainedSizeInBytes()
      Description copied from interface: PositionsAppender
      Returns number of bytes retained by this instance in memory including over-allocations.
      Specified by:
      getRetainedSizeInBytes in interface PositionsAppender
    • getSizeInBytes

      public long getSizeInBytes()
      Description copied from interface: PositionsAppender
      Returns the size of memory in bytes used by this appender.
      Specified by:
      getSizeInBytes in interface PositionsAppender