Class PageBuilder
java.lang.Object
io.trino.spi.PageBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionPageBuilder(int initialExpectedEntries, List<? extends Type> types) PageBuilder(List<? extends Type> types) Create a PageBuilder with given types. -
Method Summary
Modifier and TypeMethodDescriptionbuild()voidvoiddeclarePositions(int positions) getBlockBuilder(int channel) intlonglongbooleanisEmpty()booleanisFull()voidreset()static PageBuilderwithMaxPageSize(int maxPageBytes, List<? extends Type> types)
-
Constructor Details
-
PageBuilder
Create a PageBuilder with given types.A PageBuilder instance created with this constructor has no estimation about bytes per entry, therefore it can resize frequently while appending new rows.
This constructor should only be used to get the initial PageBuilder. Once the PageBuilder is full use reset() or newPageBuilderLike() to create a new PageBuilder instance with its size estimated based on previous data.
-
PageBuilder
-
-
Method Details
-
withMaxPageSize
-
reset
public void reset() -
getBlockBuilder
-
declarePosition
public void declarePosition() -
declarePositions
public void declarePositions(int positions) -
isFull
public boolean isFull() -
isEmpty
public boolean isEmpty() -
getPositionCount
public int getPositionCount() -
getSizeInBytes
public long getSizeInBytes() -
getRetainedSizeInBytes
public long getRetainedSizeInBytes() -
build
-