public class VariableWidthBlock extends AbstractVariableWidthBlock
| Constructor and Description |
|---|
VariableWidthBlock(int positionCount,
io.airlift.slice.Slice slice,
io.airlift.slice.Slice offsets,
io.airlift.slice.Slice valueIsNull) |
| Modifier and Type | Method and Description |
|---|---|
Block |
copyPositions(List<Integer> positions)
Returns a block containing the specified positions.
|
Block |
copyRegion(int positionOffset,
int length)
Returns a block starting at the specified position and extends for the
specified length.
|
int |
getLength(int position)
Gets the length of the value at the
position. |
int |
getPositionCount()
Returns the number of positions in this block.
|
protected int |
getPositionOffset(int position) |
protected io.airlift.slice.Slice |
getRawSlice(int position) |
Block |
getRegion(int positionOffset,
int length)
Returns a block starting at the specified position and extends for the
specified length.
|
int |
getRetainedSizeInBytes()
Returns the retained size of this block in memory.
|
int |
getSizeInBytes()
Returns the logical size of this block in memory.
|
protected boolean |
isEntryNull(int position) |
String |
toString() |
assureLoaded, bytesCompare, bytesEqual, compareTo, equals, getByte, getDouble, getEncoding, getFloat, getInt, getLong, getShort, getSingleValueBlock, getSlice, hash, isNull, writeBytesTo, writePositionTopublic VariableWidthBlock(int positionCount,
io.airlift.slice.Slice slice,
io.airlift.slice.Slice offsets,
io.airlift.slice.Slice valueIsNull)
protected final int getPositionOffset(int position)
getPositionOffset in class AbstractVariableWidthBlockpublic int getLength(int position)
Blockposition.protected boolean isEntryNull(int position)
isEntryNull in class AbstractVariableWidthBlockpublic int getPositionCount()
Blockpublic int getSizeInBytes()
Blockpublic int getRetainedSizeInBytes()
Blockpublic Block copyPositions(List<Integer> positions)
BlockThe returned block must be a compact representation of the original block.
protected io.airlift.slice.Slice getRawSlice(int position)
getRawSlice in class AbstractVariableWidthBlockpublic Block getRegion(int positionOffset, int length)
BlockThe 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 Block copyRegion(int positionOffset, int length)
BlockThe 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.
Copyright © 2012-2016. All Rights Reserved.