public abstract class AbstractFixedWidthBlock extends Object implements Block
| Modifier and Type | Field and Description |
|---|---|
protected int |
entrySize |
protected FixedWidthType |
type |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractFixedWidthBlock(FixedWidthType type) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendTo(int position,
BlockBuilder blockBuilder)
Appends the value at the specified position to the block builder.
|
int |
compareTo(int position,
io.airlift.slice.Slice otherSlice,
int otherOffset)
Compares the value at the specified position to the value at the other offset
in the other slice.
|
int |
compareTo(SortOrder sortOrder,
int position,
BlockCursor cursor)
Compares the value at the specified position to the value at the cursor.
|
int |
compareTo(SortOrder sortOrder,
int position,
Block otherBlock,
int otherPosition)
Compares the value at the specified position to the value at the other position
in the other block.
|
BlockCursor |
cursor()
Gets a cursor over the block.
|
boolean |
equalTo(int position,
BlockCursor cursor)
Is the value at the specified position equal to the value at the cursor?
|
boolean |
equalTo(int position,
Block otherBlock,
int otherPosition)
Is the value at the specified position equal to the value at the other position
in the other block?
|
boolean |
equalTo(int position,
io.airlift.slice.Slice otherSlice,
int otherOffset)
Is the value at the specified position equal to the value at the other offset
in the other slice?
|
boolean |
getBoolean(int position)
Gets the value at the specified position as a boolean.
|
double |
getDouble(int position)
Gets the value at the specified position as a double.
|
BlockEncoding |
getEncoding()
Get the encoding for this block.
|
long |
getLong(int position)
Gets the value at the specified position as a long.
|
Object |
getObjectValue(ConnectorSession session,
int position)
Gets the value at the specified position as an Object.
|
protected abstract io.airlift.slice.Slice |
getRawSlice() |
Block |
getRegion(int positionOffset,
int length)
Returns a block starting at the specified position and extends for the
specified length.
|
Block |
getSingleValueBlock(int position)
Gets the value at the specified position as a single element block.
|
int |
getSizeInBytes()
Returns the size of this block in memory.
|
io.airlift.slice.Slice |
getSlice(int position)
Gets the value at the specified position as a Slice.
|
FixedWidthType |
getType()
Gets the type of this block.
|
int |
hash(int position)
Calculates the hash code of the value at the specified position.
|
boolean |
isNull(int position)
Is the specified position null?
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPositionCountprotected final FixedWidthType type
protected final int entrySize
protected AbstractFixedWidthBlock(FixedWidthType type)
protected abstract io.airlift.slice.Slice getRawSlice()
public FixedWidthType getType()
Blockpublic int getSizeInBytes()
BlockgetSizeInBytes in interface Blockpublic BlockCursor cursor()
Blockpublic BlockEncoding getEncoding()
BlockgetEncoding in interface Blockpublic Block getRegion(int positionOffset, int length)
Blockpublic boolean getBoolean(int position)
BlockgetBoolean in interface Blockpublic long getLong(int position)
Blockpublic double getDouble(int position)
Blockpublic Object getObjectValue(ConnectorSession session, int position)
BlockgetObjectValue in interface Blockpublic io.airlift.slice.Slice getSlice(int position)
Blockpublic Block getSingleValueBlock(int position)
BlockgetSingleValueBlock in interface Blockpublic boolean isNull(int position)
Blockpublic boolean equalTo(int position,
Block otherBlock,
int otherPosition)
Blockpublic boolean equalTo(int position,
BlockCursor cursor)
Blockpublic boolean equalTo(int position,
io.airlift.slice.Slice otherSlice,
int otherOffset)
Blockpublic int hash(int position)
Blockpublic int compareTo(SortOrder sortOrder, int position, Block otherBlock, int otherPosition)
Blockpublic int compareTo(SortOrder sortOrder, int position, BlockCursor cursor)
Blockpublic int compareTo(int position,
io.airlift.slice.Slice otherSlice,
int otherOffset)
Blockpublic void appendTo(int position,
BlockBuilder blockBuilder)
BlockCopyright © 2012-2014. All Rights Reserved.