Interface BlockBuilder

All Known Implementing Classes:
ArrayBlockBuilder, ByteArrayBlockBuilder, Fixed12BlockBuilder, Int128ArrayBlockBuilder, IntArrayBlockBuilder, LongArrayBlockBuilder, MapBlockBuilder, RowBlockBuilder, ShortArrayBlockBuilder, VariableWidthBlockBuilder

public interface BlockBuilder
  • Method Details

    • getPositionCount

      int getPositionCount()
      Returns the number of positions in this block builder.
    • getSizeInBytes

      long getSizeInBytes()
      Returns the size of this block as if it was compacted, ignoring any over-allocations and any unloaded nested blocks. For example, in dictionary blocks, this only counts each dictionary entry once, rather than each time a value is referenced.
    • getRetainedSizeInBytes

      long getRetainedSizeInBytes()
      Returns the retained size of this block in memory, including over-allocations. This method is called from the innermost execution loop and must be fast.
    • appendNull

      BlockBuilder appendNull()
      Appends a null value to the block.
    • build

      Block build()
      Builds the block. This method can be called multiple times. The return value may be a block such as RLE to allow for optimizations when all block values are the same.
    • buildValueBlock

      ValueBlock buildValueBlock()
      Builds a ValueBlock. This method can be called multiple times.
    • newBlockBuilderLike

      BlockBuilder newBlockBuilderLike(int expectedEntries, BlockBuilderStatus blockBuilderStatus)
      Creates a new block builder of the same type based on the current usage statistics of this block builder.
    • newBlockBuilderLike

      default BlockBuilder newBlockBuilderLike(BlockBuilderStatus blockBuilderStatus)