public class ArrayType extends AbstractType
| Modifier and Type | Field and Description |
|---|---|
static String |
ARRAY_NULL_ELEMENT_MSG |
| 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?
|
Block |
getBlockUnchecked(Block block,
int internalPosition)
Gets the value at the
block internalPosition - offsetBase as a block
without boundary checks. |
String |
getDisplayName()
Returns the name of this type that should be displayed to end-users.
|
Type |
getElementType() |
Block |
getObject(Block block,
int position)
Gets the value at the
block position as an Object. |
Object |
getObjectValue(SqlFunctionProperties properties,
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.
|
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 |
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. |
equals, getBoolean, getBooleanUnchecked, getDouble, getDoubleUnchecked, getJavaType, getLong, getLongUnchecked, getSliceUnchecked, hashCode, toString, writeBoolean, writeDouble, writeLongpublic static final String ARRAY_NULL_ELEMENT_MSG
public ArrayType(Type elementType)
public Type getElementType()
public TypeSignature getTypeSignature()
Typepublic boolean isComparable()
TypeisComparable in interface TypeisComparable in class AbstractTypepublic boolean isOrderable()
TypeisOrderable in interface TypeisOrderable in class AbstractTypepublic boolean equalTo(Block leftBlock, int leftPosition, Block rightBlock, int rightPosition)
TypeThis method assumes input is not null.
equalTo in interface TypeequalTo in class AbstractTypepublic long hash(Block block, int position)
Typehash in interface Typehash in class AbstractTypepublic int compareTo(Block leftBlock, int leftPosition, Block rightBlock, int rightPosition)
TypecompareTo in interface TypecompareTo in class AbstractTypepublic Object getObjectValue(SqlFunctionProperties properties, Block block, int position)
Typeblock
position. This is the value returned to the user via the
REST endpoint and therefore must be JSON serializable.public void appendTo(Block block, int position, BlockBuilder blockBuilder)
Typeposition in block to blockBuilder.public io.airlift.slice.Slice getSlice(Block block, int position)
Typeblock position as a Slice.getSlice in interface TypegetSlice in class AbstractTypepublic void writeSlice(BlockBuilder blockBuilder, io.airlift.slice.Slice value)
TypeBlockBuilder.writeSlice in interface TypewriteSlice in class AbstractTypepublic void writeSlice(BlockBuilder blockBuilder, io.airlift.slice.Slice value, int offset, int length)
TypeBlockBuilder.writeSlice in interface TypewriteSlice in class AbstractTypepublic Block getObject(Block block, int position)
Typeblock position as an Object.getObject in interface TypegetObject in class AbstractTypepublic Block getBlockUnchecked(Block block, int internalPosition)
Typeblock internalPosition - offsetBase as a block
without boundary checks.getBlockUnchecked in interface TypegetBlockUnchecked in class AbstractTypepublic void writeObject(BlockBuilder blockBuilder, Object value)
TypeBlockBuilder.writeObject in interface TypewriteObject in class AbstractTypepublic BlockBuilder createBlockBuilder(BlockBuilderStatus blockBuilderStatus, int expectedEntries, int expectedBytesPerEntry)
Typepublic BlockBuilder createBlockBuilder(BlockBuilderStatus blockBuilderStatus, int expectedEntries)
Typepublic List<Type> getTypeParameters()
TypegetTypeParameters in interface TypegetTypeParameters in class AbstractTypepublic String getDisplayName()
TypegetDisplayName in interface TypegetDisplayName in class AbstractTypeCopyright © 2012–2022. All rights reserved.