Package org.apache.calcite.sql
Class SqlUserDefinedTypeNameSpec
java.lang.Object
org.apache.calcite.sql.SqlTypeNameSpec
org.apache.calcite.sql.SqlUserDefinedTypeNameSpec
A sql type name specification of user defined type.
Usually you should register the UDT into the CalciteSchema
first before referencing it in the sql statement.
-
Constructor Summary
ConstructorDescriptionSqlUserDefinedTypeNameSpec
(String name, SqlParserPos pos) SqlUserDefinedTypeNameSpec
(SqlIdentifier typeName, SqlParserPos pos) Create a SqlUserDefinedTypeNameSpec instance. -
Method Summary
Modifier and TypeMethodDescriptionderiveType
(SqlValidator validator) Derive type from this SqlTypeNameSpec.boolean
equalsDeep
(SqlTypeNameSpec spec, Litmus litmus) Returns whether this spec is structurally equivalent to another spec.void
Writes a SQL representation of this spec to a writer.Methods inherited from class org.apache.calcite.sql.SqlTypeNameSpec
getParserPos, getTypeName
-
Constructor Details
-
SqlUserDefinedTypeNameSpec
Create a SqlUserDefinedTypeNameSpec instance.- Parameters:
typeName
- Type name as SQL identifierpos
- The parser position
-
SqlUserDefinedTypeNameSpec
-
-
Method Details
-
deriveType
Description copied from class:SqlTypeNameSpec
Derive type from this SqlTypeNameSpec.- Specified by:
deriveType
in classSqlTypeNameSpec
- Parameters:
validator
- The sql validator- Returns:
- the
RelDataType
instance, throws exception if we could not deduce the type
-
unparse
Description copied from class:SqlTypeNameSpec
Writes a SQL representation of this spec to a writer.- Specified by:
unparse
in classSqlTypeNameSpec
-
equalsDeep
Description copied from class:SqlTypeNameSpec
Returns whether this spec is structurally equivalent to another spec.- Specified by:
equalsDeep
in classSqlTypeNameSpec
-