Class LogicalTypeParser
java.lang.Object
org.apache.flink.table.types.logical.utils.LogicalTypeParser
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:
STRINGas a synonym forVARCHAR(INT_MAX)BYTESas a synonym forVARBINARY(INT_MAX)NUMERICandDECas synonyms forDECIMALINTEGERas a synonym forINTDOUBLE PRECISIONas a synonym forDOUBLETIME WITHOUT TIME ZONEas a synonym forTIMETIMESTAMP WITHOUT TIME ZONEas a synonym forTIMESTAMPTIMESTAMP WITH LOCAL TIME ZONEas a synonym forTIMESTAMP_LTZtype ARRAYas a synonym forARRAY<type>type MULTISETas a synonym forMULTISET<type>ROW(...)as a synonym forROW<...>type NULLas a synonym fortype
Furthermore, it returns UnresolvedUserDefinedType for unknown types (partially or
fully qualified such as [catalog].[database].[type]).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LogicalTypeparse(String typeString, ClassLoader classLoader) Parses a type string.
-
Constructor Details
-
LogicalTypeParser
public LogicalTypeParser()
-
-
Method Details
-
parse
Parses a type string. All types will be fully resolved except forUnresolvedUserDefinedTypes.- Parameters:
typeString- a string like "ROW(field1 INT, field2 BOOLEAN)"classLoader- class loader for loading classes of the RAW type- Throws:
ValidationException- in case of parsing errors.
-