Package org.apache.calcite.sql
Class SqlTypeNameSpec
java.lang.Object
org.apache.calcite.sql.SqlTypeNameSpec
- Direct Known Subclasses:
SqlBasicTypeNameSpec,SqlCollectionTypeNameSpec,SqlMapTypeNameSpec,SqlRowTypeNameSpec,SqlUserDefinedTypeNameSpec
A
SqlTypeNameSpec is a type name specification that allows user to
customize sql node unparsing and data type deriving.
To customize sql node unparsing, override the method
unparse(SqlWriter, int, int).
To customize data type deriving, override the method
deriveType(SqlValidator).
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSqlTypeNameSpec(SqlIdentifier name, SqlParserPos pos) Creates aSqlTypeNameSpec. -
Method Summary
Modifier and TypeMethodDescriptionabstract RelDataTypederiveType(SqlValidator validator) Derive type from this SqlTypeNameSpec.abstract booleanequalsDeep(SqlTypeNameSpec spec, Litmus litmus) Returns whether this spec is structurally equivalent to another spec.abstract voidWrites a SQL representation of this spec to a writer.
-
Constructor Details
-
SqlTypeNameSpec
Creates aSqlTypeNameSpec.- Parameters:
name- Name of the typepos- Parser position, must not be null
-
-
Method Details
-
deriveType
Derive type from this SqlTypeNameSpec.- Parameters:
validator- The sql validator- Returns:
- the
RelDataTypeinstance, throws exception if we could not deduce the type
-
unparse
Writes a SQL representation of this spec to a writer. -
equalsDeep
Returns whether this spec is structurally equivalent to another spec. -
getParserPos
-
getTypeName
-