Package org.apache.spark.sql.types
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TimestampLTZNanosTypeapply()static intintDefault size used by Spark for row-size estimation.static intstatic intstatic intinttypeName()Name of the type used in JSON serialization.Methods inherited from class org.apache.spark.sql.types.DataType
catalogString, COLLATIONS_METADATA_KEY, equalsIgnoreCaseAndNullability, equalsIgnoreNullability, equalsStructurally, equalsStructurallyByName, fromDDL, fromJson, json, parseTypeWithFallback, prettyJson, simpleString, sqlMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface scala.Equals
canEqual, equalsMethods inherited from interface scala.Product
productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
-
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
-
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); seeTimestampNanosRowValues.- Specified by:
defaultSizein classDataType- Returns:
- (undocumented)
-
typeName
Description copied from class:DataTypeName of the type used in JSON serialization.
-