public abstract class AbstractRowBlock extends Object implements Block
Modifier and Type | Field and Description |
---|---|
protected int |
numFields |
Modifier | Constructor and Description |
---|---|
protected |
AbstractRowBlock(int numFields) |
Modifier and Type | Method and Description |
---|---|
Block |
copyPositions(List<Integer> positions)
Returns a block containing the specified positions.
|
Block |
copyRegion(int position,
int length)
Returns a block starting at the specified position and extends for the
specified length.
|
RowBlockEncoding |
getEncoding()
Get the encoding for this block.
|
protected int |
getFieldBlockOffset(int position) |
protected abstract int[] |
getFieldBlockOffsets() |
protected abstract Block[] |
getFieldBlocks() |
<T> T |
getObject(int position,
Class<T> clazz)
Gets an object in the value at
position . |
protected abstract int |
getOffsetBase() |
Block |
getRegion(int position,
int length)
Returns a block starting at the specified position and extends for the
specified length.
|
long |
getRegionSizeInBytes(int position,
int length)
Returns the logical size of
block.getRegion(position, length) in memory. |
protected abstract boolean[] |
getRowIsNull() |
Block |
getSingleValueBlock(int position)
Gets the value at the specified position as a single element block.
|
boolean |
isNull(int position)
Is the specified position null?
|
void |
writePositionTo(int position,
BlockBuilder blockBuilder)
Appends the value at
position to blockBuilder . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
assureLoaded, bytesCompare, bytesEqual, compareTo, equals, getByte, getInt, getLong, getPositionCount, getRetainedSizeInBytes, getShort, getSizeInBytes, getSlice, getSliceLength, hash, retainedBytesForEachPart, writeBytesTo
protected abstract Block[] getFieldBlocks()
protected abstract int[] getFieldBlockOffsets()
protected abstract int getOffsetBase()
protected abstract boolean[] getRowIsNull()
protected int getFieldBlockOffset(int position)
public RowBlockEncoding getEncoding()
Block
getEncoding
in interface Block
public Block copyPositions(List<Integer> positions)
Block
The returned block must be a compact representation of the original block.
copyPositions
in interface Block
public Block getRegion(int position, int length)
Block
The region can be a view over this block. If this block is released the region block may also be released. If the region block is released this block may also be released.
public long getRegionSizeInBytes(int position, int length)
Block
block.getRegion(position, length)
in memory.getRegionSizeInBytes
in interface Block
public Block copyRegion(int position, int length)
Block
The region returned must be a compact representation of the original block, unless their internal representation will be exactly the same. This method is useful for operators that hold on to a range of values without holding on to the entire block.
copyRegion
in interface Block
public <T> T getObject(int position, Class<T> clazz)
Block
position
.public void writePositionTo(int position, BlockBuilder blockBuilder)
Block
position
to blockBuilder
.writePositionTo
in interface Block
public Block getSingleValueBlock(int position)
Block
This method is useful for operators that hold on to a single value without holding on to the entire block.
getSingleValueBlock
in interface Block
Copyright © 2012-2017. All Rights Reserved.