public interface Type
| Modifier and Type | Method and Description |
|---|---|
void |
appendTo(Block block,
int position,
BlockBuilder blockBuilder)
Append the value at
position in block to blockBuilder. |
int |
compareTo(Block leftBlock,
int leftPosition,
Block rightBlock,
int rightPosition)
Compare the values in the specified block at the specified positions equal.
|
BlockBuilder |
createBlockBuilder(BlockBuilderStatus blockBuilderStatus)
Creates a block builder for this type.
|
boolean |
equalTo(Block leftBlock,
int leftPosition,
Block rightBlock,
int rightPosition)
Are the values in the specified blocks at the specified positions equal?
|
boolean |
getBoolean(Block block,
int position)
Gets the value at the
block position as a boolean. |
String |
getDisplayName()
Returns the name of this type that should be displayed to end-users.
|
double |
getDouble(Block block,
int position)
Gets the value at the
block position as a double. |
Class<?> |
getJavaType()
Gets the Java class type used to represent this value on the stack during
expression execution.
|
long |
getLong(Block block,
int position)
Gets the value at the
block position as a long. |
Object |
getObjectValue(ConnectorSession session,
Block block,
int position)
Gets an object representation of the type value in the
block
position. |
io.airlift.slice.Slice |
getSlice(Block block,
int position)
Gets the value at the
block position as a Slice. |
List<Type> |
getTypeParameters()
For parameterized types returns the list of parameters.
|
TypeSignature |
getTypeSignature()
Gets the name of this type which must be case insensitive globally unique.
|
int |
hash(Block block,
int position)
Calculates the hash code of the value at the specified position in the
specified block.
|
boolean |
isComparable()
True if the type supports equalTo and hash.
|
boolean |
isOrderable()
True if the type supports compareTo.
|
void |
writeBoolean(BlockBuilder blockBuilder,
boolean value)
Writes the boolean value into the
BlockBuilder. |
void |
writeDouble(BlockBuilder blockBuilder,
double value)
Writes the double value into the
BlockBuilder. |
void |
writeLong(BlockBuilder blockBuilder,
long value)
Writes the long value into the
BlockBuilder. |
void |
writeSlice(BlockBuilder blockBuilder,
io.airlift.slice.Slice value)
Writes the Slice value into the
BlockBuilder. |
void |
writeSlice(BlockBuilder blockBuilder,
io.airlift.slice.Slice value,
int offset,
int length)
Writes the Slice value into the
BlockBuilder. |
TypeSignature getTypeSignature()
String getDisplayName()
boolean isComparable()
boolean isOrderable()
Class<?> getJavaType()
List<Type> getTypeParameters()
BlockBuilder createBlockBuilder(BlockBuilderStatus blockBuilderStatus)
Object getObjectValue(ConnectorSession session, Block block, int position)
block
position. This is the value returned to the user via the
REST endpoint and therefore must be JSON serializable.boolean getBoolean(Block block, int position)
block position as a boolean.long getLong(Block block, int position)
block position as a long.double getDouble(Block block, int position)
block position as a double.io.airlift.slice.Slice getSlice(Block block, int position)
block position as a Slice.void writeBoolean(BlockBuilder blockBuilder, boolean value)
BlockBuilder.void writeLong(BlockBuilder blockBuilder, long value)
BlockBuilder.void writeDouble(BlockBuilder blockBuilder, double value)
BlockBuilder.void writeSlice(BlockBuilder blockBuilder, io.airlift.slice.Slice value)
BlockBuilder.void writeSlice(BlockBuilder blockBuilder, io.airlift.slice.Slice value, int offset, int length)
BlockBuilder.void appendTo(Block block, int position, BlockBuilder blockBuilder)
position in block to blockBuilder.boolean equalTo(Block leftBlock, int leftPosition, Block rightBlock, int rightPosition)
int hash(Block block, int position)
Copyright © 2012-2015. All Rights Reserved.