Enum LogicalTypeRoot

java.lang.Object
java.lang.Enum<LogicalTypeRoot>
org.apache.flink.table.types.logical.LogicalTypeRoot
All Implemented Interfaces:
Serializable, Comparable<LogicalTypeRoot>

@PublicEvolving public enum LogicalTypeRoot extends Enum<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)