public class ArrayBlock extends AbstractArrayBlock
AbstractArrayBlock.ArrayBlockFunction<T>| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static Block |
fromElementBlock(int positionCount,
Optional<boolean[]> valueIsNullOptional,
int[] arrayOffset,
Block values)
Create an array block directly from columnar nulls, values, and offsets into the values.
|
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() |
protected int[] |
getOffsets() |
int |
getPositionCount()
Returns the number of positions in this block.
|
protected Block |
getRawElementBlock() |
long |
getRetainedSizeInBytes()
Returns the retained size of this block in memory, including over-allocations.
|
Block |
getSingleValueBlock(int position)
Gets the value at the specified position as a single element block.
|
long |
getSizeInBytes()
Returns the size of this block as if it was compacted, ignoring any over-allocations.
|
protected boolean[] |
getValueIsNull() |
int |
hashCode() |
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(ObjLongConsumer<Object> consumer)
consumer visits each of the internal data container and accepts the size for it. |
String |
toString() |
appendNull, apply, checkReadablePosition, copyPositions, copyRegion, fixedSizeInBytesPerPosition, getApproximateRegionLogicalSizeInBytes, getBlock, getBlockUnchecked, getEncodingName, getEstimatedDataSizeForStats, getPositionsSizeInBytes, getRegion, getRegionLogicalSizeInBytes, getRegionSizeInBytes, getSingleValueBlockInternal, isNullUnchecked, writePositionTo, writePositionToclone, finalize, getClass, notify, notifyAll, wait, wait, waitbytesCompare, bytesEqual, compareTo, equals, getByte, getInt, getLong, getLong, getPositions, getShort, getSlice, getSliceLength, hash, writeBytesTo, writeBytesTogetByteUnchecked, getIntUnchecked, getLongUnchecked, getLongUnchecked, getShortUnchecked, getSliceLengthUnchecked, getSliceUncheckedpublic static Block fromElementBlock(int positionCount, Optional<boolean[]> valueIsNullOptional, int[] arrayOffset, Block values)
public int getPositionCount()
Blockpublic long getSizeInBytes()
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.public 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 blockprotected Block getRawElementBlock()
getRawElementBlock in class AbstractArrayBlockprotected int[] getOffsets()
getOffsets in class AbstractArrayBlockpublic int getOffsetBase()
getOffsetBase in interface UncheckedBlockgetOffsetBase in class AbstractArrayBlock@Nullable protected boolean[] getValueIsNull()
getValueIsNull in class AbstractArrayBlockpublic boolean mayHaveNull()
BlockmayHaveNull in interface BlockmayHaveNull in class AbstractArrayBlockpublic boolean isNull(int position)
Blockpublic Block getLoadedBlock()
BlockThis allows streaming data sources to skip sections that are not accessed in a query.
public Block getSingleValueBlock(int position)
BlockThis method is useful for operators that hold on to a single value without holding on to the entire block.
Copyright © 2012–2022. All rights reserved.