Package io.trino.spi.block
Class RowBlockBuilder
java.lang.Object
io.trino.spi.block.RowBlockBuilder
- All Implemented Interfaces:
BlockBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionRowBlockBuilder(List<Type> fieldTypes, BlockBuilderStatus blockBuilderStatus, int expectedEntries) -
Method Summary
Modifier and TypeMethodDescriptionAppends a null value to the block.build()Builds the block.<E extends Throwable>
voidbuildEntry(RowValueBuilder<E> builder) Builds a ValueBlock.intReturns the number of positions in this block builder.longReturns the retained size of this block in memory, including over-allocations.longReturns the size of this block as if it was compacted, ignoring any over-allocations and any unloaded nested blocks.newBlockBuilderLike(int expectedEntries, BlockBuilderStatus blockBuilderStatus) Creates a new block builder of the same type based on the current usage statistics of this block builder.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.trino.spi.block.BlockBuilder
newBlockBuilderLike
-
Constructor Details
-
RowBlockBuilder
public RowBlockBuilder(List<Type> fieldTypes, BlockBuilderStatus blockBuilderStatus, int expectedEntries)
-
-
Method Details
-
getPositionCount
public int getPositionCount()Description copied from interface:BlockBuilderReturns the number of positions in this block builder.- Specified by:
getPositionCountin interfaceBlockBuilder
-
getSizeInBytes
public long getSizeInBytes()Description copied from interface:BlockBuilderReturns 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.- Specified by:
getSizeInBytesin interfaceBlockBuilder
-
getRetainedSizeInBytes
public long getRetainedSizeInBytes()Description copied from interface:BlockBuilderReturns the retained size of this block in memory, including over-allocations. This method is called from the innermost execution loop and must be fast.- Specified by:
getRetainedSizeInBytesin interfaceBlockBuilder
-
buildEntry
- Throws:
E extends Throwable
-
appendNull
Description copied from interface:BlockBuilderAppends a null value to the block.- Specified by:
appendNullin interfaceBlockBuilder
-
build
Description copied from interface:BlockBuilderBuilds 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.- Specified by:
buildin interfaceBlockBuilder
-
buildValueBlock
Description copied from interface:BlockBuilderBuilds a ValueBlock. This method can be called multiple times.- Specified by:
buildValueBlockin interfaceBlockBuilder
-
toString
-
newBlockBuilderLike
Description copied from interface:BlockBuilderCreates a new block builder of the same type based on the current usage statistics of this block builder.- Specified by:
newBlockBuilderLikein interfaceBlockBuilder
-