public class SingleRowBlock extends AbstractSingleRowBlock
rowIndex| Modifier and Type | Method and Description |
|---|---|
Block |
appendNull()
Returns a block that has an appended null at the end, no matter if the original block has null or not.
|
boolean |
equals(Object obj) |
OptionalInt |
fixedSizeInBytesPerPosition()
Returns the number of bytes (in terms of
Block.getSizeInBytes()) required per position
that this block contains, assuming that the number of bytes required is a known static quantity
and not dependent on any particular specific position. |
String |
getEncodingName()
Get the encoding for this block.
|
Block |
getLoadedBlock()
Returns a block that assures all data is in memory.
|
int |
getPositionCount()
Returns the number of positions in this block.
|
protected Block |
getRawFieldBlock(int fieldIndex) |
long |
getRetainedSizeInBytes()
Returns the retained size of this block in memory, including over-allocations.
|
int |
getRowIndex() |
long |
getSizeInBytes()
Returns the size of this block as if it was compacted, ignoring any over-allocations.
|
int |
hashCode() |
void |
retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
consumer visits each of the internal data container and accepts the size for it. |
String |
toString() |
bytesCompare, bytesEqual, compareTo, copyPositions, copyRegion, equals, getBlock, getBlockUnchecked, getByte, getByteUnchecked, getEstimatedDataSizeForStats, getInt, getIntUnchecked, getLong, getLong, getLongUnchecked, getLongUnchecked, getOffsetBase, getPositionsSizeInBytes, getRegion, getRegionSizeInBytes, getShort, getShortUnchecked, getSingleValueBlock, getSlice, getSliceLength, getSliceLengthUnchecked, getSliceUnchecked, hash, isNull, isNullUnchecked, writeBytesTo, writeBytesTo, writePositionTo, writePositionToclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetApproximateRegionLogicalSizeInBytes, getLogicalSizeInBytes, getPositions, getRegionLogicalSizeInBytes, mayHaveNullprotected Block getRawFieldBlock(int fieldIndex)
getRawFieldBlock in class AbstractSingleRowBlockpublic int getPositionCount()
Blockpublic long getSizeInBytes()
Blockpublic OptionalInt fixedSizeInBytesPerPosition()
BlockBlock.getSizeInBytes()) required per position
that this block contains, assuming that the number of bytes required is a known static quantity
and not dependent on any particular specific position. This allows for some complex block wrappings
to potentially avoid having to call Block.getPositionsSizeInBytes(boolean[], int) which
would require computing the specific positions selectedpublic long getRetainedSizeInBytes()
Blockpublic void retainedBytesForEachPart(ObjLongConsumer<Object> 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 blockpublic String getEncodingName()
Blockpublic int getRowIndex()
public Block getLoadedBlock()
BlockThis allows streaming data sources to skip sections that are not accessed in a query.
public Block appendNull()
BlockCopyright © 2012–2022. All rights reserved.