Package org.apache.calcite.sql
Class SqlMapTypeNameSpec
java.lang.Object
org.apache.calcite.sql.SqlTypeNameSpec
org.apache.calcite.sql.SqlMapTypeNameSpec
Parse SQL MAP type, i.e. MAP<INT NOT NULL, TIMESTAMP NULL>, the key and value can specify a
suffix to indicate if the type is nullable, default is not null.
MAP type does not belong to standard SQL.
-
Constructor Summary
ConstructorDescriptionSqlMapTypeNameSpec
(SqlDataTypeSpec keyType, SqlDataTypeSpec valType, SqlParserPos pos) Creates aSqlMapTypeNameSpec
. -
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
-
SqlMapTypeNameSpec
Creates aSqlMapTypeNameSpec
.- Parameters:
keyType
- key typevalType
- value typepos
- the parser position
-
-
Method Details
-
getKeyType
-
getValType
-
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
-