public class RowSignatures extends Object
RowSignature.| Modifier and Type | Class and Description |
|---|---|
static class |
RowSignatures.ComplexSqlType
Calcite
RelDataType for Druid complex columns, to preserve complex type information. |
| Modifier and Type | Method and Description |
|---|---|
static RowSignature |
fromRelDataType(List<String> rowOrder,
org.apache.calcite.rel.type.RelDataType rowType) |
static StringComparator |
getNaturalStringComparator(RowSignature rowSignature,
SimpleExtraction simpleExtraction)
Return the "natural"
StringComparator for an extraction from a row signature. |
static org.apache.calcite.rel.type.RelDataType |
makeComplexType(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory,
ColumnType columnType,
boolean isNullable)
Creates a
RowSignatures.ComplexSqlType using the supplied RelDataTypeFactory to ensure that the
RowSignatures.ComplexSqlType is interned. |
static org.apache.calcite.rel.type.RelDataType |
toRelDataType(RowSignature rowSignature,
org.apache.calcite.rel.type.RelDataTypeFactory typeFactory)
Returns a Calcite RelDataType corresponding to a row signature.
|
static org.apache.calcite.rel.type.RelDataType |
toRelDataType(RowSignature rowSignature,
org.apache.calcite.rel.type.RelDataTypeFactory typeFactory,
boolean typecastTimeColumn)
Returns a Calcite RelDataType corresponding to a row signature.
|
public static RowSignature fromRelDataType(List<String> rowOrder, org.apache.calcite.rel.type.RelDataType rowType)
@Nonnull public static StringComparator getNaturalStringComparator(RowSignature rowSignature, SimpleExtraction simpleExtraction)
StringComparator for an extraction from a row signature. This will be a
lexicographic comparator for String types and a numeric comparator for Number types.public static org.apache.calcite.rel.type.RelDataType toRelDataType(RowSignature rowSignature, org.apache.calcite.rel.type.RelDataTypeFactory typeFactory)
public static org.apache.calcite.rel.type.RelDataType toRelDataType(RowSignature rowSignature, org.apache.calcite.rel.type.RelDataTypeFactory typeFactory, boolean typecastTimeColumn)
public static org.apache.calcite.rel.type.RelDataType makeComplexType(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory,
ColumnType columnType,
boolean isNullable)
RowSignatures.ComplexSqlType using the supplied RelDataTypeFactory to ensure that the
RowSignatures.ComplexSqlType is interned. This is important because Calcite checks that the references are equal
instead of the objects being equivalent.
This method uses RelDataTypeFactory#createTypeWithNullability(RelDataType, boolean) ensures 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.Copyright © 2011–2022 The Apache Software Foundation. All rights reserved.