Class RowSignatures.ComplexSqlType

java.lang.Object
org.apache.calcite.rel.type.RelDataTypeImpl
org.apache.calcite.sql.type.AbstractSqlType
org.apache.druid.sql.calcite.table.RowSignatures.ComplexSqlType
All Implemented Interfaces:
Serializable, Cloneable, org.apache.calcite.rel.type.RelDataType, org.apache.calcite.rel.type.RelDataTypeFamily
Enclosing class:
RowSignatures

public static final class RowSignatures.ComplexSqlType extends org.apache.calcite.sql.type.AbstractSqlType
Calcite 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, typeName

    Fields inherited from class org.apache.calcite.rel.type.RelDataTypeImpl

    digest, fieldList, NON_NULLABLE_SUFFIX

    Fields inherited from interface org.apache.calcite.rel.type.RelDataType

    PRECISION_NOT_SPECIFIED, SCALE_NOT_SPECIFIED
  • Constructor Summary

    Constructors
    Constructor
    Description
    ComplexSqlType(org.apache.calcite.sql.type.SqlTypeName typeName, ColumnType columnType, boolean isNullable)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    protected void
    generateTypeString(StringBuilder sb, boolean withDetail)
     
     
    org.apache.calcite.rel.type.RelDataTypeComparability
     
     

    Methods inherited from class org.apache.calcite.sql.type.AbstractSqlType

    getFamily, getPrecedenceList, getSqlTypeName, isNullable

    Methods 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, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods 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:
      getComparability in interface org.apache.calcite.rel.type.RelDataType
      Overrides:
      getComparability in class org.apache.calcite.rel.type.RelDataTypeImpl
    • generateTypeString

      protected void generateTypeString(StringBuilder sb, boolean withDetail)
      Specified by:
      generateTypeString in class org.apache.calcite.rel.type.RelDataTypeImpl
    • getColumnType

      public ColumnType getColumnType()
    • getComplexTypeName

      public String getComplexTypeName()
    • asTypeString

      public String asTypeString()