public class RowBlock extends AbstractRowBlock implements Block
numFields| Modifier and Type | Method and Description |
|---|---|
static Block |
fromFieldBlocks(int positionCount,
Optional<boolean[]> rowIsNullOptional,
Block[] fieldBlocks)
Create a row block directly from columnar nulls and field blocks.
|
protected int[] |
getFieldBlockOffsets() |
Block |
getLoadedBlock()
Returns a block that assures all data is in memory.
|
long |
getLogicalSizeInBytes()
Returns the size of the block contents, regardless of internal representation.
|
int |
getOffsetBase() |
int |
getPositionCount()
Returns the number of positions in this block.
|
protected Block[] |
getRawFieldBlocks() |
long |
getRetainedSizeInBytes()
Returns the retained size of this block in memory, including over-allocations.
|
protected boolean[] |
getRowIsNull() |
long |
getSizeInBytes()
Returns the size of this block as if it was compacted, ignoring any over-allocations.
|
boolean |
isNull(int position)
Is the specified position null?
|
boolean |
mayHaveNull()
Is it possible the block may have a null value? If false, the block can not contain
a null, but if true, the block may or may not have a null.
|
void |
retainedBytesForEachPart(BiConsumer<Object,Long> consumer)
consumer visits each of the internal data container and accepts the size for it. |
String |
toString() |
appendNull, checkReadablePosition, copyPositions, copyRegion, fixedSizeInBytesPerPosition, getApproximateRegionLogicalSizeInBytes, getBlock, getBlockUnchecked, getEncodingName, getEstimatedDataSizeForStats, getFieldBlockOffset, getPositionsSizeInBytes, getRegion, getRegionLogicalSizeInBytes, getRegionSizeInBytes, getSingleValueBlock, isNullUnchecked, writePositionTo, writePositionToclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitappendNull, bytesCompare, bytesEqual, compareTo, copyPositions, copyRegion, equals, fixedSizeInBytesPerPosition, getApproximateRegionLogicalSizeInBytes, getBlock, getByte, getEncodingName, getEstimatedDataSizeForStats, getInt, getLong, getLong, getPositions, getPositionsSizeInBytes, getRegion, getRegionLogicalSizeInBytes, getRegionSizeInBytes, getShort, getSingleValueBlock, getSlice, getSliceLength, hash, writeBytesTo, writeBytesTo, writePositionTo, writePositionTogetBlockUnchecked, getByteUnchecked, getIntUnchecked, getLongUnchecked, getLongUnchecked, getShortUnchecked, getSliceLengthUnchecked, getSliceUnchecked, isNullUncheckedpublic static Block fromFieldBlocks(int positionCount, Optional<boolean[]> rowIsNullOptional, Block[] fieldBlocks)
protected Block[] getRawFieldBlocks()
getRawFieldBlocks in class AbstractRowBlockprotected int[] getFieldBlockOffsets()
getFieldBlockOffsets in class AbstractRowBlockpublic int getOffsetBase()
getOffsetBase in interface UncheckedBlockgetOffsetBase in class AbstractRowBlock@Nullable protected boolean[] getRowIsNull()
getRowIsNull in class AbstractRowBlockpublic boolean mayHaveNull()
BlockmayHaveNull in interface BlockmayHaveNull in class AbstractRowBlockpublic boolean isNull(int position)
Blockpublic int getPositionCount()
BlockgetPositionCount in interface Blockpublic long getSizeInBytes()
BlockgetSizeInBytes in interface Blockpublic long getLogicalSizeInBytes()
BlockBlock.getSizeInBytes() for certain block
types. For RLE, it will be N times larger. For dictionary, it will be
larger based on how many times dictionary entries are reused.getLogicalSizeInBytes in interface Blockpublic long getRetainedSizeInBytes()
BlockgetRetainedSizeInBytes in interface Blockpublic void retainedBytesForEachPart(BiConsumer<Object,Long> consumer)
Blockconsumer visits each of the internal data container and accepts the size for it.
This method can be helpful in cases such as memory counting for internal data structure.
Also, the method should be non-recursive, only visit the elements at the top level,
and specifically should not call retainedBytesForEachPart on nested blocks
consumer should be called at least once with the current block and
must include the instance size of the current blockretainedBytesForEachPart in interface Blockpublic Block getLoadedBlock()
BlockThis allows streaming data sources to skip sections that are not accessed in a query.
getLoadedBlock in interface BlockCopyright © 2012–2022. All rights reserved.