public class ArrayBlockBuilder extends AbstractArrayBlock implements BlockBuilder
| Constructor and Description |
|---|
ArrayBlockBuilder(BlockBuilder valuesBlock,
BlockBuilderStatus blockBuilderStatus,
int expectedEntries)
Caller of this constructor is responsible for making sure `valuesBlock` is constructed with the same `blockBuilderStatus` as the one in the argument
|
ArrayBlockBuilder(Type elementType,
BlockBuilderStatus blockBuilderStatus,
int expectedEntries) |
ArrayBlockBuilder(Type elementType,
BlockBuilderStatus blockBuilderStatus,
int expectedEntries,
int expectedBytesPerEntry) |
| Modifier and Type | Method and Description |
|---|---|
BlockBuilder |
appendNull()
Appends a null value to the block.
|
void |
assureLoaded()
Assures that all data for the block is in memory.
|
ArrayElementBlockWriter |
beginBlockEntry()
Return a writer to the current entry.
|
ArrayBlock |
build()
Builds the block.
|
BlockBuilder |
closeEntry()
Write a byte to the current entry;
|
protected int |
getOffsetBase() |
protected io.airlift.slice.Slice |
getOffsets() |
int |
getPositionCount()
Returns the number of positions in this block.
|
int |
getRetainedSizeInBytes()
Returns the retained size of this block in memory.
|
int |
getSizeInBytes()
Returns the logical size of this block in memory.
|
protected io.airlift.slice.Slice |
getValueIsNull() |
protected Block |
getValues() |
String |
toString() |
BlockBuilder |
writeByte(int value)
Write a byte to the current entry;
|
BlockBuilder |
writeBytes(io.airlift.slice.Slice source,
int sourceIndex,
int length)
Write a byte sequences to the current entry;
|
BlockBuilder |
writeDouble(double value)
Write a double to the current entry;
|
BlockBuilder |
writeFloat(float value)
Write a float to the current entry;
|
BlockBuilder |
writeInt(int value)
Write a int to the current entry;
|
BlockBuilder |
writeLong(long value)
Write a long to the current entry;
|
BlockBuilder |
writeObject(Object value)
Write an object to the current entry;
|
BlockBuilder |
writeShort(int value)
Write a short to the current entry;
|
bytesCompare, bytesEqual, compareTo, copyPositions, copyRegion, equals, getByte, getDouble, getEncoding, getFloat, getInt, getLength, getLong, getObject, getRegion, getShort, getSingleValueBlock, getSlice, hash, isNull, writeBytesTo, writePositionToclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitbytesCompare, bytesEqual, compareTo, copyPositions, copyRegion, equals, getByte, getDouble, getEncoding, getFloat, getInt, getLength, getLong, getObject, getRegion, getShort, getSingleValueBlock, getSlice, hash, isNull, writeBytesTo, writePositionTopublic ArrayBlockBuilder(BlockBuilder valuesBlock, BlockBuilderStatus blockBuilderStatus, int expectedEntries)
public ArrayBlockBuilder(Type elementType, BlockBuilderStatus blockBuilderStatus, int expectedEntries, int expectedBytesPerEntry)
public ArrayBlockBuilder(Type elementType, BlockBuilderStatus blockBuilderStatus, int expectedEntries)
public int getPositionCount()
BlockgetPositionCount in interface Blockpublic int getSizeInBytes()
BlockgetSizeInBytes in interface Blockpublic int getRetainedSizeInBytes()
BlockgetRetainedSizeInBytes in interface Blockprotected Block getValues()
getValues in class AbstractArrayBlockprotected io.airlift.slice.Slice getOffsets()
getOffsets in class AbstractArrayBlockprotected int getOffsetBase()
getOffsetBase in class AbstractArrayBlockprotected io.airlift.slice.Slice getValueIsNull()
getValueIsNull in class AbstractArrayBlockpublic void assureLoaded()
BlockThis allows streaming data sources to skip sections that are not accessed in a query.
assureLoaded in interface Blockpublic BlockBuilder writeByte(int value)
BlockBuilderwriteByte in interface BlockBuilderpublic BlockBuilder writeShort(int value)
BlockBuilderwriteShort in interface BlockBuilderpublic BlockBuilder writeInt(int value)
BlockBuilderwriteInt in interface BlockBuilderpublic BlockBuilder writeLong(long value)
BlockBuilderwriteLong in interface BlockBuilderpublic BlockBuilder writeFloat(float value)
BlockBuilderwriteFloat in interface BlockBuilderpublic BlockBuilder writeDouble(double value)
BlockBuilderwriteDouble in interface BlockBuilderpublic BlockBuilder writeBytes(io.airlift.slice.Slice source, int sourceIndex, int length)
BlockBuilderwriteBytes in interface BlockBuilderpublic BlockBuilder writeObject(Object value)
BlockBuilderwriteObject in interface BlockBuilderpublic ArrayElementBlockWriter beginBlockEntry()
BlockBuilderbeginBlockEntry in interface BlockBuilderpublic BlockBuilder closeEntry()
BlockBuildercloseEntry in interface BlockBuilderpublic BlockBuilder appendNull()
BlockBuilderappendNull in interface BlockBuilderpublic ArrayBlock build()
BlockBuilderbuild in interface BlockBuilderCopyright © 2012-2016. All Rights Reserved.