Class TimeType

All Implemented Interfaces:
FixedWidthType, Type

public final class TimeType extends AbstractLongType
A time is stored as picoseconds from midnight.
  • Field Details

    • MAX_PRECISION

      public static final int MAX_PRECISION
      See Also:
    • DEFAULT_PRECISION

      public static final int DEFAULT_PRECISION
      See Also:
    • TIME_SECONDS

      public static final TimeType TIME_SECONDS
    • TIME_MILLIS

      public static final TimeType TIME_MILLIS
    • TIME_MICROS

      public static final TimeType TIME_MICROS
    • TIME_NANOS

      public static final TimeType TIME_NANOS
    • TIME_PICOS

      public static final TimeType TIME_PICOS
  • Method Details

    • createTimeType

      public static TimeType createTimeType(int precision)
    • getPrecision

      public int getPrecision()
    • getTypeOperatorDeclaration

      public TypeOperatorDeclaration getTypeOperatorDeclaration(TypeOperators typeOperators)
      Description copied from interface: Type
      Gets the declared type specific operators for this type.
      Specified by:
      getTypeOperatorDeclaration in interface Type
      Overrides:
      getTypeOperatorDeclaration in class AbstractLongType
    • getObjectValue

      public Object getObjectValue(ConnectorSession session, Block block, int position)
      Description copied from interface: Type
      Gets an object representation of the type value in the block position. 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)