Class TimeType

Object
org.apache.spark.sql.types.DataType
org.apache.spark.sql.types.TimeType
All Implemented Interfaces:
Serializable, scala.Equals, scala.Product

public class TimeType extends DataType implements scala.Product, Serializable
The time type represents a time value with fields hour, minute, second, up to microseconds. The range of times supported is 00:00:00.000000 to 23:59:59.999999.

param: precision The time fractional seconds precision which indicates the number of decimal digits maintained following the decimal point in the seconds value. The supported range is [0, 6].

Since:
4.1.0
See Also:
  • Constructor Details

    • TimeType

      public TimeType(int precision)
  • Method Details

    • MIN_PRECISION

      public static int MIN_PRECISION()
    • MICROS_PRECISION

      public static int MICROS_PRECISION()
    • MAX_PRECISION

      public static int MAX_PRECISION()
    • DEFAULT_PRECISION

      public static int DEFAULT_PRECISION()
    • NANOS_PRECISION

      public static int NANOS_PRECISION()
    • apply

      public static TimeType apply()
    • precision

      public int precision()
    • defaultSize

      public int defaultSize()
      The default size of a value of the TimeType is 8 bytes.
      Specified by:
      defaultSize in class DataType
      Returns:
      (undocumented)
    • typeName

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