public class DynamicRecordTypeImpl extends DynamicRecordType
RelDataType for a dynamic table.
It's used during SQL validation, where the field list is mutable for
the getField() call. After SQL validation, a normal RelDataTypeImpl
with an immutable field list takes the place of the DynamicRecordTypeImpl
instance.
DYNAMIC_STAR_PREFIXdigest, fieldList, NON_NULLABLE_SUFFIXPRECISION_NOT_SPECIFIED, SCALE_NOT_SPECIFIED| Constructor and Description |
|---|
DynamicRecordTypeImpl(RelDataTypeFactory typeFactory)
Creates a DynamicRecordTypeImpl.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
generateTypeString(StringBuilder sb,
boolean withDetail)
Generates a string representation of this type.
|
RelDataTypeFamily |
getFamily()
Gets a canonical object representing the family of this type.
|
@Nullable RelDataTypeField |
getField(String fieldName,
boolean caseSensitive,
boolean elideRecord)
Looks up a field by name.
|
int |
getFieldCount()
Returns the number of fields in a struct type.
|
List<RelDataTypeField> |
getFieldList()
Gets the fields in a struct type.
|
List<String> |
getFieldNames()
Returns the names of the fields in a struct type.
|
RelDataTypePrecedenceList |
getPrecedenceList()
Returns the precedence list for this type.
|
SqlTypeName |
getSqlTypeName()
Gets the
SqlTypeName of this type. |
boolean |
isStruct()
Queries whether this is a structured type.
|
isDynamicStarColName, isDynamicStructcomputeDigest, equals, extra, getCharset, getCollation, getComparability, getComponentType, getFieldMap, getFullTypeString, getIntervalQualifier, getKeyType, getPrecision, getScale, getSqlIdentifier, getStructKind, getValueType, hashCode, isNullable, proto, proto, proto, proto, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitequalsSansFieldNamespublic DynamicRecordTypeImpl(RelDataTypeFactory typeFactory)
public List<RelDataTypeField> getFieldList()
RelDataTypegetFieldList in interface RelDataTypegetFieldList in class RelDataTypeImplpublic int getFieldCount()
RelDataTypeThis method is equivalent to
.RelDataType.getFieldList().size()
getFieldCount in interface RelDataTypegetFieldCount in class RelDataTypeImplpublic @Nullable RelDataTypeField getField(String fieldName, boolean caseSensitive, boolean elideRecord)
RelDataTypeNOTE: Be careful choosing the value of caseSensitive:
true if you are sure that the field name is
internally generated.false is almost certainly wrong.getField in interface RelDataTypegetField in class RelDataTypeImplfieldName - Name of field to findcaseSensitive - Whether match is case-sensitiveelideRecord - Whether to find fields nested within recordspublic List<String> getFieldNames()
RelDataTypegetFieldNames in interface RelDataTypegetFieldNames in class RelDataTypeImplpublic SqlTypeName getSqlTypeName()
RelDataTypeImplSqlTypeName of this type.
Sub-classes must override the method to ensure the resulting value is non-nullable.getSqlTypeName in interface RelDataTypegetSqlTypeName in class RelDataTypeImplpublic RelDataTypePrecedenceList getPrecedenceList()
RelDataTypegetPrecedenceList in interface RelDataTypegetPrecedenceList in class RelDataTypeImplprotected void generateTypeString(StringBuilder sb, boolean withDetail)
RelDataTypeImplgenerateTypeString in class RelDataTypeImplsb - StringBuilder into which to generate the stringwithDetail - when true, all detail information needed to compute a
unique digest (and return from getFullTypeString) should
be included;public boolean isStruct()
RelDataTypeisStruct in interface RelDataTypeisStruct in class RelDataTypeImplpublic RelDataTypeFamily getFamily()
RelDataTypegetFamily in interface RelDataTypegetFamily in class RelDataTypeImplCopyright © 2012-2022 Apache Software Foundation. All Rights Reserved.