Class AbstractIntType
java.lang.Object
io.trino.spi.type.AbstractType
io.trino.spi.type.AbstractIntType
- All Implemented Interfaces:
FixedWidthType,Type
- Direct Known Subclasses:
DateType,IntegerType,RealType
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.trino.spi.type.Type
Type.Range -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidappendTo(Block block, int position, BlockBuilder blockBuilder) Append the value atpositioninblocktoblockBuilder.protected voidcheckValueValid(long value) final BlockBuildercreateBlockBuilder(BlockBuilderStatus blockBuilderStatus, int expectedEntries) Creates the preferred block builder for this type.final BlockBuildercreateFixedSizeBlockBuilder(int positionCount) Creates a block builder for this type sized to hold the specified number of positions.final intGets the size of a value of this type in bytes.intReturns the fixed size of this type when written to a flat buffer.final intfinal longGets the value at theblockpositionas a long.getTypeOperatorDeclaration(TypeOperators typeOperators) Gets the declared type specific operators for this type.booleanTrue if the type supports equalTo and hash.booleanTrue if the type supports compareTo.writeInt(BlockBuilder blockBuilder, int value) voidwriteLong(BlockBuilder blockBuilder, long value) Writes the long value into theBlockBuilder.Methods inherited from class io.trino.spi.type.AbstractType
equals, getBoolean, getDisplayName, getDouble, getJavaType, getObject, getSlice, getTypeParameters, getTypeSignature, getValueBlockType, hashCode, toString, writeBoolean, writeDouble, writeObject, writeSlice, writeSliceMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.trino.spi.type.FixedWidthType
createBlockBuilder, getFlatVariableWidthSize, isFlatVariableWidth, relocateFlatVariableWidthOffsetsMethods inherited from interface io.trino.spi.type.Type
createNullBlock, getBaseName, getBoolean, getDiscreteValues, getDisplayName, getDouble, getJavaType, getNextValue, getObject, getObjectValue, getPreviousValue, getRange, getSlice, getTypeId, getTypeParameters, getTypeSignature, getValueBlockType, writeBoolean, writeDouble, writeObject, writeSlice, writeSlice
-
Constructor Details
-
AbstractIntType
-
-
Method Details
-
getFixedSize
public final int getFixedSize()Description copied from interface:FixedWidthTypeGets the size of a value of this type in bytes. All values of a FixedWidthType are the same size.- Specified by:
getFixedSizein interfaceFixedWidthType
-
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.- Specified by:
getTypeOperatorDeclarationin interfaceType
-
getLong
-
getInt
-
writeLong
Description copied from interface:TypeWrites the long value into theBlockBuilder.- Specified by:
writeLongin interfaceType- Overrides:
writeLongin classAbstractType
-
writeInt
-
checkValueValid
protected void checkValueValid(long value) -
appendTo
Description copied from interface:TypeAppend the value atpositioninblocktoblockBuilder. -
getFlatFixedSize
public int getFlatFixedSize()Description copied from interface:TypeReturns the fixed size of this type when written to a flat buffer.- Specified by:
getFlatFixedSizein interfaceType
-
createBlockBuilder
public final BlockBuilder 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.- Specified by:
createBlockBuilderin interfaceType
-
createFixedSizeBlockBuilder
Description copied from interface:FixedWidthTypeCreates a block builder for this type sized to hold the specified number of positions.- Specified by:
createFixedSizeBlockBuilderin interfaceFixedWidthType
-