Package org.apache.calcite.sql.type
Class ArraySqlType
- java.lang.Object
-
- org.apache.calcite.rel.type.RelDataTypeImpl
-
- org.apache.calcite.sql.type.AbstractSqlType
-
- org.apache.calcite.sql.type.ArraySqlType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,RelDataType
,RelDataTypeFamily
public class ArraySqlType extends AbstractSqlType
SQL array type.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private RelDataType
elementType
-
Fields inherited from class org.apache.calcite.sql.type.AbstractSqlType
isNullable, typeName
-
Fields inherited from class org.apache.calcite.rel.type.RelDataTypeImpl
digest, fieldList
-
Fields inherited from interface org.apache.calcite.rel.type.RelDataType
PRECISION_NOT_SPECIFIED, SCALE_NOT_SPECIFIED
-
-
Constructor Summary
Constructors Constructor Description ArraySqlType(RelDataType elementType, boolean isNullable)
Creates an ArraySqlType.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
generateTypeString(java.lang.StringBuilder sb, boolean withDetail)
Generates a string representation of this type.RelDataType
getComponentType()
Gets the component type if this type is a collection, otherwise null.RelDataTypeFamily
getFamily()
Gets a canonical object representing the family of this type.RelDataTypePrecedenceList
getPrecedenceList()
-
Methods inherited from class org.apache.calcite.sql.type.AbstractSqlType
getSqlTypeName, isNullable
-
Methods inherited from class org.apache.calcite.rel.type.RelDataTypeImpl
computeDigest, equals, extra, getCharset, getCollation, getComparability, getField, getFieldCount, getFieldList, getFieldNames, getFullTypeString, getIntervalQualifier, getKeyType, getPrecision, getScale, getSqlIdentifier, getStructKind, getValueType, hashCode, isDynamicStruct, isStruct, proto, proto, proto, proto, toString
-
-
-
-
Field Detail
-
elementType
private final RelDataType elementType
-
-
Constructor Detail
-
ArraySqlType
public ArraySqlType(RelDataType elementType, boolean isNullable)
Creates an ArraySqlType. This constructor should only be called from a factory method.
-
-
Method Detail
-
generateTypeString
protected void generateTypeString(java.lang.StringBuilder sb, boolean withDetail)
Description copied from class:RelDataTypeImpl
Generates a string representation of this type.- Specified by:
generateTypeString
in classRelDataTypeImpl
- Parameters:
sb
- StringBuffer into which to generate the stringwithDetail
- when true, all detail information needed to compute a unique digest (and return from getFullTypeString) should be included;
-
getComponentType
public RelDataType getComponentType()
Description copied from interface:RelDataType
Gets the component type if this type is a collection, otherwise null.- Specified by:
getComponentType
in interfaceRelDataType
- Overrides:
getComponentType
in classRelDataTypeImpl
- Returns:
- canonical type descriptor for components
-
getFamily
public RelDataTypeFamily getFamily()
Description copied from interface:RelDataType
Gets a canonical object representing the family of this type. Two values can be compared if and only if their types are in the same family.- Specified by:
getFamily
in interfaceRelDataType
- Overrides:
getFamily
in classAbstractSqlType
- Returns:
- canonical object representing type family
-
getPrecedenceList
public RelDataTypePrecedenceList getPrecedenceList()
- Specified by:
getPrecedenceList
in interfaceRelDataType
- Overrides:
getPrecedenceList
in classAbstractSqlType
- Returns:
- precedence list for this type
-
-