Package org.apache.calcite.sql
Class SqlAlienSystemTypeNameSpec
java.lang.Object
org.apache.calcite.sql.SqlTypeNameSpec
org.apache.calcite.sql.SqlBasicTypeNameSpec
org.apache.calcite.sql.SqlAlienSystemTypeNameSpec
Represents a type name for an alien system. For example,
UNSIGNED is a built-in type in MySQL which is synonym of INTEGER.
You can use this class to define a customized type name with specific alias, for example, in some systems, STRING is synonym of VARCHAR and BYTES is synonym of VARBINARY.
Internally we may use the SqlAlienSystemTypeNameSpec
to unparse
as the builtin data type name for some alien systems during rel-to-sql conversion.
-
Constructor Summary
ConstructorDescriptionSqlAlienSystemTypeNameSpec
(String typeAlias, SqlTypeName typeName, int precision, SqlParserPos pos) Creates aSqlAlienSystemTypeNameSpec
instance.SqlAlienSystemTypeNameSpec
(String typeAlias, SqlTypeName typeName, SqlParserPos pos) Creates aSqlAlienSystemTypeNameSpec
instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
equalsDeep
(SqlTypeNameSpec node, 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.SqlBasicTypeNameSpec
deriveType, getCharSetName, getPrecision, getScale
Methods inherited from class org.apache.calcite.sql.SqlTypeNameSpec
getParserPos, getTypeName
-
Constructor Details
-
SqlAlienSystemTypeNameSpec
Creates aSqlAlienSystemTypeNameSpec
instance.- Parameters:
typeAlias
- Type alias of the alien systemtypeName
- Type name thetypeAlias
implies as the (standard) basic type namepos
- The parser position
-
SqlAlienSystemTypeNameSpec
public SqlAlienSystemTypeNameSpec(String typeAlias, SqlTypeName typeName, int precision, SqlParserPos pos) Creates aSqlAlienSystemTypeNameSpec
instance.- Parameters:
typeAlias
- Type alias of the alien systemtypeName
- Type name thetypeAlias
implies as the (standard) basic type nameprecision
- Type Precisionpos
- The parser position
-
-
Method Details
-
unparse
Description copied from class:SqlTypeNameSpec
Writes a SQL representation of this spec to a writer.- Overrides:
unparse
in classSqlBasicTypeNameSpec
-
equalsDeep
Description copied from class:SqlTypeNameSpec
Returns whether this spec is structurally equivalent to another spec.- Overrides:
equalsDeep
in classSqlBasicTypeNameSpec
-