Package org.apache.calcite.sql
Class SqlCollectionTypeNameSpec
java.lang.Object
org.apache.calcite.sql.SqlTypeNameSpec
org.apache.calcite.sql.SqlCollectionTypeNameSpec
A sql type name specification of collection type.
 
The grammar definition in SQL-2011 IWD 9075-2:201?(E) 6.1 <collection type> is as following:
 <collection type> ::=
     <array type>
   | <multiset type>
 <array type> ::=
   <data type> ARRAY
   [ <left bracket or trigraph>
     <maximum cardinality>
     <right bracket or trigraph> ]
 <maximum cardinality> ::=
   <unsigned integer>
 <multiset type> ::=
   <data type> MULTISET
 This class is intended to describe SQL collection type. It can describe
 either simple collection type like "int array" or nested collection type like
 "int array array" or "int array multiset". For nested collection type, the element type
 name of this SqlCollectionTypeNameSpec is also a SqlCollectionTypeNameSpec.
- 
Constructor SummaryConstructorsConstructorDescriptionSqlCollectionTypeNameSpec(SqlTypeNameSpec elementTypeName, SqlTypeName collectionTypeName, SqlParserPos pos) Creates aSqlCollectionTypeNameSpec.
- 
Method SummaryModifier and TypeMethodDescriptionderiveType(SqlValidator validator) Derive type from this SqlTypeNameSpec.booleanequalsDeep(SqlTypeNameSpec spec, 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.SqlTypeNameSpecgetParserPos, getTypeName
- 
Constructor Details- 
SqlCollectionTypeNameSpecpublic SqlCollectionTypeNameSpec(SqlTypeNameSpec elementTypeName, SqlTypeName collectionTypeName, SqlParserPos pos) Creates aSqlCollectionTypeNameSpec.- Parameters:
- elementTypeName- Type of the collection element
- collectionTypeName- Collection type name
- pos- Parser position, must not be null
 
 
- 
- 
Method Details- 
getElementTypeName
- 
deriveTypeDescription copied from class:SqlTypeNameSpecDerive type from this SqlTypeNameSpec.- Specified by:
- deriveTypein class- SqlTypeNameSpec
- Parameters:
- validator- The sql validator
- Returns:
- the RelDataTypeinstance, throws exception if we could not deduce the type
 
- 
unparseDescription copied from class:SqlTypeNameSpecWrites a SQL representation of this spec to a writer.- Specified by:
- unparsein class- SqlTypeNameSpec
 
- 
equalsDeepDescription copied from class:SqlTypeNameSpecReturns whether this spec is structurally equivalent to another spec.- Specified by:
- equalsDeepin class- SqlTypeNameSpec
 
 
-