Package io.trino.operator.output
Interface PositionsAppender
- All Known Implementing Classes:
BytePositionsAppender,Int128PositionsAppender,Int96PositionsAppender,IntPositionsAppender,LongPositionsAppender,RleAwarePositionsAppender,RowPositionsAppender,ShortPositionsAppender,SlicePositionsAppender,UnnestingPositionsAppender
public interface PositionsAppender
-
Method Summary
Modifier and TypeMethodDescriptionvoidAppends single position.voidvoidAppends the specified value positionCount times.build()Creates the block from the appender data.longReturns number of bytes retained by this instance in memory including over-allocations.longReturns the size of memory in bytes used by this appender.
-
Method Details
-
append
-
appendRle
Appends the specified value positionCount times. The result is the same as with usingappend(IntArrayList, Block)with positions list [0...positionCount -1] but with possible performance optimizations. -
append
Appends single position. The implementation must be conceptually equal toappend(IntArrayList.wrap(new int[] {position}), source)but may be optimized. Caller should avoid using this method ifappend(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. -
build
Block build()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. -
getRetainedSizeInBytes
long getRetainedSizeInBytes()Returns number of bytes retained by this instance in memory including over-allocations. -
getSizeInBytes
long getSizeInBytes()Returns the size of memory in bytes used by this appender.
-