Class RowSignatures.ComplexSqlType
- All Implemented Interfaces:
Serializable,Cloneable,org.apache.calcite.rel.type.RelDataType,org.apache.calcite.rel.type.RelDataTypeFamily
- Enclosing class:
- RowSignatures
RelDataType for Druid complex columns, to preserve complex type information.
If using with other operations of a RelDataTypeFactory, consider wrapping the creation of this type in
to ensure that if the type factory is a
{@link org.apache.calcite.rel.type.RelDataTypeFactoryImpl} that the type is passed through
{@link org.apache.calcite.rel.type.RelDataTypeFactoryImpl#canonize(RelDataType)} which interns the type.
<p>
If {@link SqlTypeName} is going to be {@link SqlTypeName#OTHER} and a {@link RelDataTypeFactory} is available,
consider using {@link #makeComplexType(RelDataTypeFactory, ColumnType, boolean)}.
<p>
This type does not work well with {@link org.apache.calcite.sql.type.ReturnTypes#explicit(RelDataType)}, which
will create new {@link RelDataType} using {@link SqlTypeName} during return type inference, so implementors of
{@link org.apache.druid.sql.calcite.expression.SqlOperatorConversion} should implement the
{@link org.apache.calcite.sql.type.SqlReturnTypeInference} directly for best results.
- See Also:
-
Field Summary
Fields inherited from class org.apache.calcite.sql.type.AbstractSqlType
isNullable, typeNameFields inherited from class org.apache.calcite.rel.type.RelDataTypeImpl
digest, fieldList, NON_NULLABLE_SUFFIXFields inherited from interface org.apache.calcite.rel.type.RelDataType
PRECISION_NOT_SPECIFIED, SCALE_NOT_SPECIFIED -
Constructor Summary
ConstructorsConstructorDescriptionComplexSqlType(org.apache.calcite.sql.type.SqlTypeName typeName, ColumnType columnType, boolean isNullable) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidgenerateTypeString(StringBuilder sb, boolean withDetail) org.apache.calcite.rel.type.RelDataTypeComparabilityMethods inherited from class org.apache.calcite.sql.type.AbstractSqlType
getFamily, getPrecedenceList, getSqlTypeName, isNullableMethods inherited from class org.apache.calcite.rel.type.RelDataTypeImpl
computeDigest, equals, extra, getCharset, getCollation, getComponentType, getField, getFieldCount, getFieldList, getFieldMap, getFieldNames, getFullTypeString, getIntervalQualifier, getKeyType, getPrecision, getScale, getSqlIdentifier, getStructKind, getValueType, hashCode, isDynamicStruct, isStruct, proto, proto, proto, proto, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.calcite.rel.type.RelDataType
equalsSansFieldNames, getMeasureElementType
-
Constructor Details
-
ComplexSqlType
public ComplexSqlType(org.apache.calcite.sql.type.SqlTypeName typeName, ColumnType columnType, boolean isNullable)
-
-
Method Details
-
getComparability
public org.apache.calcite.rel.type.RelDataTypeComparability getComparability()- Specified by:
getComparabilityin interfaceorg.apache.calcite.rel.type.RelDataType- Overrides:
getComparabilityin classorg.apache.calcite.rel.type.RelDataTypeImpl
-
generateTypeString
- Specified by:
generateTypeStringin classorg.apache.calcite.rel.type.RelDataTypeImpl
-
getColumnType
-
getComplexTypeName
-
asTypeString
-