Class ArrayType
java.lang.Object
io.trino.spi.type.AbstractType
io.trino.spi.type.ArrayType
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.trino.spi.type.Type
Type.Range -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendTo(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.Returns the name of this type that should be displayed to end-users.intReturns the fixed size of this type when written to a flat buffer.intgetFlatVariableWidthSize(Block block, int position) Returns the variable width size of the value at the specified position when written to a flat buffer.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.booleanReturns true if this type is variable width when written to a flat buffer.booleanTrue if the type supports compareTo.intrelocateFlatVariableWidthOffsets(byte[] fixedSizeSlice, int fixedSizeOffset, byte[] variableSizeSlice, int variableSizeOffset) Update the variable width offsets recorded in the value.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, getValueBlockType, 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
createNullBlock, getBaseName, getDiscreteValues, getNextValue, getPreviousValue, getRange, getTypeId
-
Constructor Details
-
ArrayType
-
-
Method Details
-
getTypeOperatorDeclaration
Description copied from interface:TypeGets the declared type specific operators for this type. -
getElementType
-
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
-
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
-
writeObject
Description copied from interface:TypeWrites the Object value into theBlockBuilder.- Specified by:
writeObjectin interfaceType- Overrides:
writeObjectin classAbstractType
-
getFlatFixedSize
public int getFlatFixedSize()Description copied from interface:TypeReturns the fixed size of this type when written to a flat buffer. -
isFlatVariableWidth
public boolean isFlatVariableWidth()Description copied from interface:TypeReturns true if this type is variable width when written to a flat buffer. -
getFlatVariableWidthSize
-
relocateFlatVariableWidthOffsets
public int relocateFlatVariableWidthOffsets(byte[] fixedSizeSlice, int fixedSizeOffset, byte[] variableSizeSlice, int variableSizeOffset) Description copied from interface:TypeUpdate the variable width offsets recorded in the value. This method is called after the value has been moved to a new location, and therefore the offsets need to be updated. Returns the length of the variable width data, so container types can update their offsets.- Returns:
- the length of the variable width data
-
createBlockBuilder
public ArrayBlockBuilder 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
public ArrayBlockBuilder createBlockBuilder(BlockBuilderStatus blockBuilderStatus, int expectedEntries) 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. -
getTypeParameters
Description copied from interface:TypeFor parameterized types returns the list of parameters.- Specified by:
getTypeParametersin interfaceType- Overrides:
getTypeParametersin classAbstractType
-
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
-