Package io.trino.spi.type
Class TimeType
java.lang.Object
io.trino.spi.type.AbstractType
io.trino.spi.type.AbstractLongType
io.trino.spi.type.TimeType
- All Implemented Interfaces:
FixedWidthType,Type
A time is stored as picoseconds from midnight.
-
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) getObjectValue(ConnectorSession session, Block block, int position) Gets an object representation of the type value in theblockposition.intgetTypeOperatorDeclaration(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, 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
getFlatVariableWidthSize, isFlatVariableWidth, relocateFlatVariableWidthOffsetsMethods inherited from interface io.trino.spi.type.Type
getBaseName, getBoolean, getDiscreteValues, getDisplayName, getDouble, getJavaType, getNextValue, getObject, getPreviousValue, getRange, 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. -
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)
-