Class LongArrayBlockBuilder
java.lang.Object
io.trino.spi.block.LongArrayBlockBuilder
- All Implemented Interfaces:
BlockBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionLongArrayBlockBuilder(BlockBuilderStatus blockBuilderStatus, int expectedEntries) -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(ValueBlock block, int position) Append the specified value.Appends a null value to the block.voidappendPositions(ValueBlock block, int[] positions, int offset, int length) Append the values at the specified positions.voidappendRange(ValueBlock block, int offset, int length) Append the values in the specified range.voidappendRepeated(ValueBlock block, int position, int count) Append the specified value multiple times.build()Builds the block.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.voidresetTo(int position) Rolls back added data to the specified position.toString()writeLong(long value) 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
-
LongArrayBlockBuilder
-
-
Method Details
-
writeLong
-
append
Description copied from interface:BlockBuilderAppend the specified value.- Specified by:
appendin interfaceBlockBuilder
-
appendRepeated
Description copied from interface:BlockBuilderAppend the specified value multiple times.- Specified by:
appendRepeatedin interfaceBlockBuilder
-
appendRange
Description copied from interface:BlockBuilderAppend the values in the specified range.- Specified by:
appendRangein interfaceBlockBuilder
-
appendPositions
Description copied from interface:BlockBuilderAppend the values at the specified positions.- Specified by:
appendPositionsin interfaceBlockBuilder
-
appendNull
Description copied from interface:BlockBuilderAppends a null value to the block.- Specified by:
appendNullin interfaceBlockBuilder
-
resetTo
public void resetTo(int position) Description copied from interface:BlockBuilderRolls back added data to the specified position. Resetting may result in a block without nulls with the may-have-nulls flag set. The PageBuilder status will not be updated to reflect the removed data size.- Specified by:
resetToin 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
-
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
-
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
-
getPositionCount
public int getPositionCount()Description copied from interface:BlockBuilderReturns the number of positions in this block builder.- Specified by:
getPositionCountin interfaceBlockBuilder
-
toString
-