public class SliceArrayBlock extends AbstractVariableWidthBlock
| Constructor and Description |
|---|
SliceArrayBlock(int positionCount,
io.airlift.slice.Slice[] values) |
SliceArrayBlock(int positionCount,
io.airlift.slice.Slice[] values,
boolean valueSlicesAreDistinct) |
| 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.
|
BlockEncoding |
getEncoding()
Get the encoding for this block.
|
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.
|
static int |
getSliceArraySizeInBytes(io.airlift.slice.Slice[] values) |
io.airlift.slice.Slice[] |
getValues() |
protected boolean |
isEntryNull(int position) |
String |
toString() |
assureLoaded, bytesCompare, bytesEqual, compareTo, equals, getByte, getDouble, getFloat, getInt, getLong, getShort, getSingleValueBlock, getSlice, hash, isNull, writeBytesTo, writePositionTopublic SliceArrayBlock(int positionCount,
io.airlift.slice.Slice[] values)
public SliceArrayBlock(int positionCount,
io.airlift.slice.Slice[] values,
boolean valueSlicesAreDistinct)
public io.airlift.slice.Slice[] getValues()
protected io.airlift.slice.Slice getRawSlice(int position)
getRawSlice in class AbstractVariableWidthBlockprotected int getPositionOffset(int position)
getPositionOffset in class AbstractVariableWidthBlockprotected boolean isEntryNull(int position)
isEntryNull in class AbstractVariableWidthBlockpublic BlockEncoding getEncoding()
BlockgetEncoding in interface BlockgetEncoding in class AbstractVariableWidthBlockpublic Block copyPositions(List<Integer> positions)
BlockThe returned block must be a compact representation of the original block.
public int getPositionCount()
Blockpublic int getLength(int position)
Blockposition.public int getSizeInBytes()
Blockpublic int getRetainedSizeInBytes()
Blockpublic 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.
public static int getSliceArraySizeInBytes(io.airlift.slice.Slice[] values)
Copyright © 2012-2016. All Rights Reserved.