Class DayTimeIntervalType

All Implemented Interfaces:
Serializable, scala.Equals, scala.Product, scala.Serializable

public class DayTimeIntervalType extends DataType implements scala.Product, scala.Serializable
The type represents day-time intervals of the SQL standard. A day-time interval is made up of a contiguous subset of the following fields: - SECOND, seconds within minutes and possibly fractions of a second [0..59.999999], - MINUTE, minutes within hours [0..59], - HOUR, hours within days [0..23], - DAY, days in the range [0..106751991].

DayTimeIntervalType represents positive as well as negative day-time intervals.

param: startField The leftmost field which the type comprises of. Valid values: 0 (DAY), 1 (HOUR), 2 (MINUTE), 3 (SECOND). param: endField The rightmost field which the type comprises of. Valid values: 0 (DAY), 1 (HOUR), 2 (MINUTE), 3 (SECOND).

See Also:
  • Constructor Details

    • DayTimeIntervalType

      public DayTimeIntervalType(byte startField, byte endField)
  • Method Details

    • DAY

      public static byte DAY()
    • HOUR

      public static byte HOUR()
    • MINUTE

      public static byte MINUTE()
    • SECOND

      public static byte SECOND()
    • dayTimeFields

      public static scala.collection.Seq<Object> dayTimeFields()
    • fieldToString

      public static String fieldToString(byte field)
    • stringToField

      public static scala.collection.immutable.Map<String,Object> stringToField()

      public static DayTimeIntervalType DEFAULT()
    • apply

      public static DayTimeIntervalType apply()
    • apply

      public static DayTimeIntervalType apply(byte field)
    • canEqual

      public abstract static boolean canEqual(Object that)
    • equals

      public abstract static boolean equals(Object that)
    • productElement

      public abstract static Object productElement(int n)
    • productArity

      public abstract static int productArity()
    • productIterator

      public static scala.collection.Iterator<Object> productIterator()
    • productPrefix

      public static String productPrefix()
    • startField

      public byte startField()
    • endField

      public byte endField()
    • defaultSize

      public int defaultSize()
      The day-time interval type has constant precision. A value of the type always occupies 8 bytes. The DAY field is constrained by the upper bound 106751991 to fit to Long.
      Specified by:
      defaultSize in class DataType
    • typeName

      public String typeName()
      Description copied from class: DataType
      Name of the type used in JSON serialization.
      typeName in class DataType