Class TimestampLTZNanosType

Object
org.apache.spark.sql.types.AbstractDataType
org.apache.spark.sql.types.DataType
org.apache.spark.sql.types.DatetimeType
org.apache.spark.sql.types.AnyTimestampNanoType
org.apache.spark.sql.types.TimestampLTZNanosType
All Implemented Interfaces:
Serializable, scala.Equals, scala.Product

public class TimestampLTZNanosType extends org.apache.spark.sql.types.AnyTimestampNanoType implements scala.Product, Serializable
Timestamp with local time zone with fractional-second precision in the nanosecond-capable range (7 to 9 decimal digits). Represents a time instant analogous to TimestampType, but with sub-microsecond precision: valid range is [0001-01-01T00:00:00.000000000Z, 9999-12-31T23:59:59.999999999Z] in the proleptic Gregorian calendar at UTC+00:00. No time zone is stored; the session time zone is used when converting values to and from text.

param: precision Number of digits of fractional seconds for this SQL type. The valid values are 7, 8, and 9 where 9 means nanosecond precision.

Since:
4.3.0
See Also:
  • Constructor Details

    • TimestampLTZNanosType

      public TimestampLTZNanosType(int precision)
  • Method Details

    • MIN_PRECISION

      public static int MIN_PRECISION()
    • MAX_PRECISION

      public static int MAX_PRECISION()
    • NANOS_PRECISION

      public static int NANOS_PRECISION()
    • DEFAULT_PRECISION

      public static int DEFAULT_PRECISION()
    • apply

      public static TimestampLTZNanosType apply()
    • precision

      public int precision()
    • defaultSize

      public int defaultSize()
      Default size used by Spark for row-size estimation. Values are represented logically as epoch microseconds (Long, 8 bytes) plus nanoseconds within that micro (Short, 2 bytes).

      In UnsafeRow, the physical payload is 16 bytes in the variable-length region (two 8-byte words); see TimestampNanosRowValues.

      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