Package org.apache.calcite.rel.type
Class RelCrossType
- java.lang.Object
-
- org.apache.calcite.rel.type.RelDataTypeImpl
-
- org.apache.calcite.rel.type.RelCrossType
-
- All Implemented Interfaces:
RelDataType
,RelDataTypeFamily
public class RelCrossType extends RelDataTypeImpl
Type of the cartesian product of two or more sets of records.Its fields are those of its constituent records, but unlike a
RelRecordType
, those fields' names are not necessarily distinct.
-
-
Field Summary
Fields Modifier and Type Field Description com.google.common.collect.ImmutableList<RelDataType>
types
-
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 RelCrossType(java.util.List<RelDataType> types, java.util.List<RelDataTypeField> fields)
Creates a cartesian product type.
-
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.java.util.List<RelDataTypeField>
getFieldList()
Gets the fields in a struct type.boolean
isStruct()
Queries whether this is a structured type.-
Methods inherited from class org.apache.calcite.rel.type.RelDataTypeImpl
computeDigest, equals, extra, getCharset, getCollation, getComparability, getComponentType, getFamily, getField, getFieldCount, getFieldNames, getFullTypeString, getIntervalQualifier, getKeyType, getPrecedenceList, getPrecision, getScale, getSqlIdentifier, getSqlTypeName, getStructKind, getValueType, hashCode, isDynamicStruct, isNullable, proto, proto, proto, proto, toString
-
-
-
-
Field Detail
-
types
public final com.google.common.collect.ImmutableList<RelDataType> types
-
-
Constructor Detail
-
RelCrossType
public RelCrossType(java.util.List<RelDataType> types, java.util.List<RelDataTypeField> fields)
Creates a cartesian product type. This should only be called from a factory method.
-
-
Method Detail
-
isStruct
public boolean isStruct()
Description copied from interface:RelDataType
Queries whether this is a structured type.- Specified by:
isStruct
in interfaceRelDataType
- Overrides:
isStruct
in classRelDataTypeImpl
- Returns:
- whether this type has fields; examples include rows and user-defined structured types in SQL, and classes in Java
-
getFieldList
public java.util.List<RelDataTypeField> getFieldList()
Description copied from interface:RelDataType
Gets the fields in a struct type. The field count is equal to the size of the returned list.- Specified by:
getFieldList
in interfaceRelDataType
- Overrides:
getFieldList
in classRelDataTypeImpl
- Returns:
- read-only list of fields
-
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;
-
-