Class LogicalTypeParser


  • @PublicEvolving
    public final class LogicalTypeParser
    extends Object
    Parser for creating instances of LogicalType from a serialized string created with LogicalType.asSerializableString().

    In addition to the serializable string representations, this parser also supports common shortcuts for certain types. This includes:

    • STRING as a synonym for VARCHAR(INT_MAX)
    • BYTES as a synonym for VARBINARY(INT_MAX)
    • NUMERIC and DEC as synonyms for DECIMAL
    • INTEGER as a synonym for INT
    • DOUBLE PRECISION as a synonym for DOUBLE
    • TIME WITHOUT TIME ZONE as a synonym for TIME
    • TIMESTAMP WITHOUT TIME ZONE as a synonym for TIMESTAMP
    • TIMESTAMP WITH LOCAL TIME ZONE as a synonym for TIMESTAMP_LTZ
    • type ARRAY as a synonym for ARRAY<type>
    • type MULTISET as a synonym for MULTISET<type>
    • ROW(...) as a synonym for ROW<...>
    • type NULL as a synonym for type

    Furthermore, it returns UnresolvedUserDefinedType for unknown types (partially or fully qualified such as [catalog].[database].[type]).