@Public public final class TimeType extends DataType
hour:minute:second[.fractional]
with
up to nanosecond precision and values ranging from 00:00:00.000000000
to 23:59:59.999999999
. Compared to the SQL standard, leap seconds (23:59:60 and 23:59:61) are not
supported as the semantics are closer to LocalTime
. A time WITH time zone is
not provided.
A conversion from and to int
describes the number of milliseconds of the day. A
conversion from and to long
describes the number of nanoseconds of the day.
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PRECISION |
static int |
MAX_PRECISION |
static int |
MIN_PRECISION |
Constructor and Description |
---|
TimeType() |
TimeType(boolean isNullable,
int precision) |
TimeType(int precision) |
Modifier and Type | Method and Description |
---|---|
<R> R |
accept(DataTypeVisitor<R> visitor) |
String |
asSQLString()
Returns a string that summarizes this type as SQL standard string for printing to a console.
|
DataType |
copy(boolean isNullable)
Returns a deep copy of this type with possibly different nullability.
|
boolean |
equals(Object o) |
int |
getPrecision() |
int |
hashCode() |
collectFieldIds, copy, equalsIgnoreNullable, getTypeRoot, is, is, isAnyOf, isAnyOf, isNullable, notNull, nullable, serializeJson, toString, withNullability
public static final int MIN_PRECISION
public static final int MAX_PRECISION
public static final int DEFAULT_PRECISION
public TimeType(boolean isNullable, int precision)
public TimeType(int precision)
public TimeType()
public int getPrecision()
public DataType copy(boolean isNullable)
DataType
public String asSQLString()
DataType
asSQLString
in class DataType
public <R> R accept(DataTypeVisitor<R> visitor)
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.