- 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
RelDataTypeFactory#createTypeWithNullability(RelDataType, boolean) 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.
If {@link SqlTypeName} is going to be {@link SqlTypeName#OTHER} and a {@link RelDataTypeFactory} is available,
consider using {@link #makeComplexType(RelDataTypeFactory, ColumnType, boolean)}.
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:
- Serialized Form