Package org.apache.gravitino.rel.types
Class Types.TimestampType
java.lang.Object
org.apache.gravitino.rel.types.Type.PrimitiveType
org.apache.gravitino.rel.types.Type.DateTimeType
org.apache.gravitino.rel.types.Types.TimestampType
- All Implemented Interfaces:
Type
- Enclosing class:
- Types
The timestamp type in Gravitino.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.gravitino.rel.types.Type
Type.ComplexType, Type.DateTimeType, Type.FractionType, Type.IntegralType, Type.IntervalType, Type.Name, Type.NumericType, Type.PrimitiveType -
Field Summary
Fields inherited from class org.apache.gravitino.rel.types.Type.DateTimeType
DATE_TIME_PRECISION_NOT_SET, MAX_ALLOWED_PRECISION, MIN_ALLOWED_PRECISION -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()booleanbooleanname()inttoString()static Types.TimestampTypestatic Types.TimestampTypewithoutTimeZone(int precision) static Types.TimestampTypestatic Types.TimestampTypewithTimeZone(int precision)
-
Method Details
-
withoutTimeZone
- Returns:
- A
Types.TimestampTypewithout time zone.
-
withTimeZone
- Returns:
- A
Types.TimestampTypewith time zone.
-
withoutTimeZone
- Parameters:
precision- The precision of the timestamp type.- Returns:
- A
Types.TimestampTypewith the given precision and without time zone.
-
withTimeZone
- Parameters:
precision- The precision of the timestamp type.- Returns:
- A
Types.TimestampTypewith the given precision and time zone.
-
hasTimeZone
public boolean hasTimeZone()- Returns:
- True if the timestamp type has time zone, false otherwise.
-
precision
public int precision()- Returns:
- The precision of the timestamp type.
-
hasPrecisionSet
public boolean hasPrecisionSet()- Returns:
- True if the timestamp type has precision set, false otherwise.
-
name
- Returns:
- The generic name of the type.
-
simpleString
- Returns:
- The simple string representation of the timestamp type.
-
equals
-
hashCode
public int hashCode() -
toString
-