public class RowType extends AbstractType
| Modifier and Type | Class and Description |
|---|---|
static class |
RowType.Field |
| Modifier and Type | Method and Description |
|---|---|
static RowType |
anonymous(List<Type> types) |
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?
|
static RowType.Field |
field(String name,
Type type) |
static RowType.Field |
field(Type type) |
static RowType |
from(List<RowType.Field> fields) |
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.
|
List<RowType.Field> |
getFields() |
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. |
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.
|
static RowType |
withDefaultFieldNames(List<Type> types) |
void |
writeObject(BlockBuilder blockBuilder,
Object value)
Writes the Object value into the
BlockBuilder. |
equals, getBoolean, getBooleanUnchecked, getDouble, getDoubleUnchecked, getJavaType, getLong, getLongUnchecked, getSlice, getSliceUnchecked, hashCode, toString, writeBoolean, writeDouble, writeLong, writeSlice, writeSlicepublic static RowType from(List<RowType.Field> fields)
public static RowType.Field field(String name, Type type)
public static RowType.Field field(Type type)
public TypeSignature getTypeSignature()
Typepublic BlockBuilder createBlockBuilder(BlockBuilderStatus blockBuilderStatus, int expectedEntries, int expectedBytesPerEntry)
Typepublic BlockBuilder createBlockBuilder(BlockBuilderStatus blockBuilderStatus, int expectedEntries)
Typepublic String getDisplayName()
TypegetDisplayName in interface TypegetDisplayName 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 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 List<Type> getTypeParameters()
TypegetTypeParameters in interface TypegetTypeParameters in class AbstractTypepublic List<RowType.Field> getFields()
public 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 int compareTo(Block leftBlock, int leftPosition, Block rightBlock, int rightPosition)
TypecompareTo in interface TypecompareTo in class AbstractTypeCopyright © 2012–2022. All rights reserved.