| Constructor and Description |
|---|
FunctionType(List<Type> argumentTypes,
Type returnType) |
| 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,
int expectedEntries)
Creates the preferred block builder for this type.
|
BlockBuilder |
createBlockBuilder(BlockBuilderStatus blockBuilderStatus,
int expectedEntries,
int expectedBytesPerEntry)
Creates the preferred 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?
|
List<Type> |
getArgumentTypes() |
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 |
getObject(Block block,
int position)
Gets the value at the
block position as an Object. |
Object |
getObjectValue(ConnectorSession session,
Block block,
int position)
Gets an object representation of the type value in the
block
position. |
Type |
getReturnType() |
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.
|
long |
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 |
writeObject(BlockBuilder blockBuilder,
Object value)
Writes the Object 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. |
public static final String NAME
public Type getReturnType()
public List<Type> getTypeParameters()
TypegetTypeParameters in interface Typepublic final TypeSignature getTypeSignature()
TypegetTypeSignature in interface Typepublic String getDisplayName()
TypegetDisplayName in interface Typepublic final Class<?> getJavaType()
TypeCurrently, this must be boolean, long, double, Slice or Block.
getJavaType in interface Typepublic boolean isComparable()
TypeisComparable in interface Typepublic boolean isOrderable()
TypeisOrderable in interface Typepublic long hash(Block block, int position)
Typepublic boolean equalTo(Block leftBlock, int leftPosition, Block rightBlock, int rightPosition)
TypeThis method assumes input is not null.
public int compareTo(Block leftBlock, int leftPosition, Block rightBlock, int rightPosition)
Typepublic boolean getBoolean(Block block, int position)
Typeblock position as a boolean.getBoolean in interface Typepublic void writeBoolean(BlockBuilder blockBuilder, boolean value)
TypeBlockBuilder.writeBoolean in interface Typepublic long getLong(Block block, int position)
Typeblock position as a long.public void writeLong(BlockBuilder blockBuilder, long value)
TypeBlockBuilder.public double getDouble(Block block, int position)
Typeblock position as a double.public void writeDouble(BlockBuilder blockBuilder, double value)
TypeBlockBuilder.writeDouble in interface Typepublic io.airlift.slice.Slice getSlice(Block block, int position)
Typeblock position as a Slice.public void writeSlice(BlockBuilder blockBuilder, io.airlift.slice.Slice value)
TypeBlockBuilder.writeSlice in interface Typepublic void writeSlice(BlockBuilder blockBuilder, io.airlift.slice.Slice value, int offset, int length)
TypeBlockBuilder.writeSlice in interface Typepublic Object getObject(Block block, int position)
Typeblock position as an Object.public void writeObject(BlockBuilder blockBuilder, Object value)
TypeBlockBuilder.writeObject in interface Typepublic Object getObjectValue(ConnectorSession session, Block block, int position)
Typeblock
position. This is the value returned to the user via the
REST endpoint and therefore must be JSON serializable.getObjectValue in interface Typepublic void appendTo(Block block, int position, BlockBuilder blockBuilder)
Typeposition in block to blockBuilder.public BlockBuilder createBlockBuilder(BlockBuilderStatus blockBuilderStatus, int expectedEntries, int expectedBytesPerEntry)
TypecreateBlockBuilder in interface Typepublic BlockBuilder createBlockBuilder(BlockBuilderStatus blockBuilderStatus, int expectedEntries)
TypecreateBlockBuilder in interface TypeCopyright © 2012–2019. All rights reserved.