Enum LogicalTypeRoot
- All Implemented Interfaces:
Serializable,Comparable<LogicalTypeRoot>
An enumeration of logical type roots containing static information about logical data types.
A root is an essential description of a LogicalType without additional parameters. For
example, a parameterized logical type DECIMAL(12,3) possesses all characteristics of its
root DECIMAL. Additionally, a logical type root enables efficient comparison during the
evaluation of types.
The enumeration is very close to the SQL standard in terms of naming and completeness.
However, it reflects just a subset of the evolving standard and contains some extensions (such as
NULL, SYMBOL, or RAW).
See the type-implementing classes for a more detailed description of each type.
Note to implementers: Whenever we perform a match against a type root (e.g. using a switch/case statement), it is recommended to:
- Order the items by the type root definition in this class for easy readability.
- Think about the behavior of all type roots for the implementation. A default fallback is dangerous when introducing a new type root in the future.
- In many runtime cases, resolve the indirection of
DISTINCT_TYPE:return myMethod(((DistinctType) type).getSourceType)
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic LogicalTypeRootReturns the enum constant of this type with the specified name.static LogicalTypeRoot[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
CHAR
-
VARCHAR
-
BOOLEAN
-
BINARY
-
VARBINARY
-
DECIMAL
-
TINYINT
-
SMALLINT
-
INTEGER
-
BIGINT
-
FLOAT
-
DOUBLE
-
DATE
-
TIME_WITHOUT_TIME_ZONE
-
TIMESTAMP_WITHOUT_TIME_ZONE
-
TIMESTAMP_WITH_TIME_ZONE
-
TIMESTAMP_WITH_LOCAL_TIME_ZONE
-
INTERVAL_YEAR_MONTH
-
INTERVAL_DAY_TIME
-
ARRAY
-
MULTISET
-
MAP
-
ROW
-
DISTINCT_TYPE
-
STRUCTURED_TYPE
-
NULL
-
RAW
-
SYMBOL
-
UNRESOLVED
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getFamilies
-