Class TimeType
java.lang.Object
io.trino.spi.type.AbstractType
io.trino.spi.type.AbstractLongType
io.trino.spi.type.TimeType
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.trino.spi.type.Type
Type.Range -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic TimeTypecreateTimeType(int precision) static booleanequalOperator(long left, long right) getNextValue(Object object) Returns the minimum value that compares greater thanvalue.getObjectValue(ConnectorSession session, Block block, int position) Gets an object representation of the type value in theblockposition.intgetPreviousValue(Object object) Returns the maximum value that compares less thanvalue.getRange()Return the range of possible values for this type, if available.getTypeOperatorDeclaration(TypeOperators typeOperators) Gets the declared type specific operators for this type.static longhashCodeOperator(long value) static booleanlessThan(long left, long right) static booleanlessThanOrEqual(long left, long right) static longxxHash64Operator(long value) Methods inherited from class io.trino.spi.type.AbstractLongType
appendTo, createBlockBuilder, createFixedSizeBlockBuilder, getFixedSize, getFlatFixedSize, getLong, hash, isComparable, isOrderable, writeLongMethods 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, getObject, getSlice, getTypeId, getTypeParameters, getTypeSignature, getValueBlockType, writeBoolean, writeDouble, writeObject, writeSlice, writeSlice
-
Field Details
-
MAX_PRECISION
public static final int MAX_PRECISION- See Also:
-
DEFAULT_PRECISION
public static final int DEFAULT_PRECISION- See Also:
-
TIME_SECONDS
-
TIME_MILLIS
-
TIME_MICROS
-
TIME_NANOS
-
TIME_PICOS
-
-
Method Details
-
createTimeType
-
getPrecision
public int getPrecision() -
getTypeOperatorDeclaration
Description copied from interface:TypeGets the declared type specific operators for this type.- Specified by:
getTypeOperatorDeclarationin interfaceType- Overrides:
getTypeOperatorDeclarationin classAbstractLongType
-
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. -
getRange
Description copied from interface:TypeReturn the range of possible values for this type, if available.The type of the values must match
Type.getJavaType() -
getPreviousValue
Description copied from interface:TypeReturns the maximum value that compares less thanvalue.The type of the value must match
Type.getJavaType(). -
getNextValue
Description copied from interface:TypeReturns the minimum value that compares greater thanvalue.The type of the value must match
Type.getJavaType(). -
equalOperator
public static boolean equalOperator(long left, long right) -
hashCodeOperator
public static long hashCodeOperator(long value) -
xxHash64Operator
public static long xxHash64Operator(long value) -
lessThan
public static boolean lessThan(long left, long right) -
lessThanOrEqual
public static boolean lessThanOrEqual(long left, long right)
-