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
ConstructorsConstructorDescriptionSqlAlienSystemTypeNameSpec(String typeAlias, SqlTypeName typeName, int precision, SqlParserPos pos) Creates aSqlAlienSystemTypeNameSpecinstance.SqlAlienSystemTypeNameSpec(String typeAlias, SqlTypeName typeName, SqlParserPos pos) Creates aSqlAlienSystemTypeNameSpecinstance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanequalsDeep(SqlTypeNameSpec node, Litmus litmus) Returns whether this spec is structurally equivalent to another spec.voidWrites a SQL representation of this spec to a writer.Methods inherited from class org.apache.calcite.sql.SqlBasicTypeNameSpec
deriveType, getCharSetName, getPrecision, getScaleMethods inherited from class org.apache.calcite.sql.SqlTypeNameSpec
getParserPos, getTypeName
-
Constructor Details
-
SqlAlienSystemTypeNameSpec
Creates aSqlAlienSystemTypeNameSpecinstance.- Parameters:
typeAlias- Type alias of the alien systemtypeName- Type name thetypeAliasimplies as the (standard) basic type namepos- The parser position
-
SqlAlienSystemTypeNameSpec
public SqlAlienSystemTypeNameSpec(String typeAlias, SqlTypeName typeName, int precision, SqlParserPos pos) Creates aSqlAlienSystemTypeNameSpecinstance.- Parameters:
typeAlias- Type alias of the alien systemtypeName- Type name thetypeAliasimplies as the (standard) basic type nameprecision- Type Precisionpos- The parser position
-
-
Method Details
-
unparse
Description copied from class:SqlTypeNameSpecWrites a SQL representation of this spec to a writer.- Overrides:
unparsein classSqlBasicTypeNameSpec
-
equalsDeep
Description copied from class:SqlTypeNameSpecReturns whether this spec is structurally equivalent to another spec.- Overrides:
equalsDeepin classSqlBasicTypeNameSpec
-