@PublicEvolving public final class ZonedTimestampType extends DataType
year-month-day
hour:minute:second[.fractional] zone with up to nanosecond precision and values ranging from
0000-01-01 00:00:00.000000000 +14:59 to 9999-12-31 23:59:59.999999999 -14:59.
Compared to the SQL standard, leap seconds (23:59:60 and 23:59:61) are not supported as the
semantics are closer to OffsetDateTime.
The serialized string representation is TIMESTAMP(p) WITH TIME ZONE where p is
the number of digits of fractional seconds (=precision). p must have a value between 0
and 9 (both inclusive). If no precision is specified, p is equal to 6.
Compared to LocalZonedTimestampType, the time zone offset information is physically
stored in every datum. It is used individually for every computation, visualization, or
communication to external systems.
A conversion from ZonedDateTime ignores the zone ID.
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
DEFAULT_PRECISION |
static int |
MAX_PRECISION |
static int |
MIN_PRECISION |
| 构造器和说明 |
|---|
ZonedTimestampType() |
ZonedTimestampType(boolean isNullable,
int precision)
Internal constructor that allows attaching additional metadata about time attribute
properties.
|
ZonedTimestampType(int precision) |
| 限定符和类型 | 方法和说明 |
|---|---|
<R> R |
accept(DataTypeVisitor<R> visitor) |
String |
asSerializableString()
Returns a string that fully serializes this instance.
|
String |
asSummaryString()
Returns a string that summarizes this type for printing to a console.
|
DataType |
copy(boolean isNullable)
Returns a deep copy of this type with possibly different nullability.
|
boolean |
equals(Object o) |
List<DataType> |
getChildren() |
int |
getPrecision() |
int |
hashCode() |
copy, getTypeRoot, is, is, isAnyOf, isAnyOf, isNullable, notNull, nullable, toString, withNullabilitypublic static final int MIN_PRECISION
public static final int MAX_PRECISION
public static final int DEFAULT_PRECISION
public ZonedTimestampType(boolean isNullable,
int precision)
public ZonedTimestampType(int precision)
public ZonedTimestampType()
public int getPrecision()
public DataType copy(boolean isNullable)
DataTypepublic String asSerializableString()
DataTypeasSerializableString 在类中 DataTypepublic String asSummaryString()
DataTypeUse DataType.asSerializableString() for a type string that fully serializes this instance.
asSummaryString 在类中 DataTypepublic List<DataType> getChildren()
getChildren 在类中 DataTypepublic <R> R accept(DataTypeVisitor<R> visitor)
Copyright © 2025 The Apache Software Foundation. All rights reserved.