Package io.trino.spi.type
Class RowType
java.lang.Object
io.trino.spi.type.AbstractType
io.trino.spi.type.RowType
- All Implemented Interfaces:
Type
As defined in ISO/IEC FCD 9075-2 (SQL 2011), section 4.8
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.trino.spi.type.Type
Type.Range -
Method Summary
Modifier and TypeMethodDescriptionstatic RowTypestatic RowTypeanonymousRow(Type... types) voidappendTo(Block block, int position, BlockBuilder blockBuilder) Append the value atpositioninblocktoblockBuilder.createBlockBuilder(BlockBuilderStatus blockBuilderStatus, int expectedEntries) Creates the preferred block builder for this type.createBlockBuilder(BlockBuilderStatus blockBuilderStatus, int expectedEntries, int expectedBytesPerEntry) Creates the preferred block builder for this type.static RowTypecreateWithTypeSignature(TypeSignature typeSignature, List<RowType.Field> fields) static RowType.Fieldstatic RowType.Fieldstatic RowTypefrom(List<RowType.Field> fields) Returns the name of this type that should be displayed to end-users.Gets the value at theblockpositionas an Object.getObjectValue(ConnectorSession session, Block block, int position) Gets an object representation of the type value in theblockposition.getTypeOperatorDeclaration(TypeOperators typeOperators) Gets the declared type specific operators for this type.For parameterized types returns the list of parameters.booleanTrue if the type supports equalTo and hash.booleanTrue if the type supports compareTo.static RowTyperowType(RowType.Field... field) voidwriteObject(BlockBuilder blockBuilder, Object value) Writes the Object value into theBlockBuilder.Methods inherited from class io.trino.spi.type.AbstractType
equals, getBoolean, getDouble, getJavaType, getLong, getSlice, getTypeSignature, hashCode, toString, writeBoolean, writeDouble, writeLong, writeSlice, writeSliceMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.trino.spi.type.Type
getBaseName, getDiscreteValues, getNextValue, getPreviousValue, getRange, getTypeId
-
Method Details
-
from
-
anonymous
-
rowType
-
anonymousRow
-
createWithTypeSignature
public static RowType createWithTypeSignature(TypeSignature typeSignature, List<RowType.Field> fields) -
field
-
field
-
createBlockBuilder
public BlockBuilder createBlockBuilder(BlockBuilderStatus blockBuilderStatus, int expectedEntries, int expectedBytesPerEntry) Description copied from interface:TypeCreates the preferred block builder for this type. This is the builder used to store values after an expression projection within the query. -
createBlockBuilder
Description copied from interface:TypeCreates the preferred block builder for this type. This is the builder used to store values after an expression projection within the query. -
getDisplayName
Description copied from interface:TypeReturns the name of this type that should be displayed to end-users.- Specified by:
getDisplayNamein interfaceType- Overrides:
getDisplayNamein classAbstractType
-
getObjectValue
Description copied from interface:TypeGets an object representation of the type value in theblockposition. This is the value returned to the user via the REST endpoint and therefore must be JSON serializable. -
appendTo
Description copied from interface:TypeAppend the value atpositioninblocktoblockBuilder. -
getObject
Description copied from interface:TypeGets the value at theblockpositionas an Object.- Specified by:
getObjectin interfaceType- Overrides:
getObjectin classAbstractType
-
writeObject
Description copied from interface:TypeWrites the Object value into theBlockBuilder.- Specified by:
writeObjectin interfaceType- Overrides:
writeObjectin classAbstractType
-
getTypeParameters
Description copied from interface:TypeFor parameterized types returns the list of parameters.- Specified by:
getTypeParametersin interfaceType- Overrides:
getTypeParametersin classAbstractType
-
getFields
-
isComparable
public boolean isComparable()Description copied from interface:TypeTrue if the type supports equalTo and hash.- Specified by:
isComparablein interfaceType- Overrides:
isComparablein classAbstractType
-
isOrderable
public boolean isOrderable()Description copied from interface:TypeTrue if the type supports compareTo.- Specified by:
isOrderablein interfaceType- Overrides:
isOrderablein classAbstractType
-
getTypeOperatorDeclaration
Description copied from interface:TypeGets the declared type specific operators for this type.
-