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.
| Modifier and Type | Field and Description |
|---|---|
private RelDataTypeHolder |
holder |
DYNAMIC_STAR_PREFIXdigest, fieldListPRECISION_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.
|
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() |
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, getFullTypeString, getIntervalQualifier, getKeyType, getPrecision, getScale, getSqlIdentifier, getStructKind, getValueType, hashCode, isNullable, proto, proto, proto, proto, toStringprivate final RelDataTypeHolder holder
public 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 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()
RelDataTypeSqlTypeName of this type.getSqlTypeName in interface RelDataTypegetSqlTypeName in class RelDataTypeImplpublic RelDataTypePrecedenceList getPrecedenceList()
getPrecedenceList in interface RelDataTypegetPrecedenceList in class RelDataTypeImplprotected void generateTypeString(StringBuilder sb, boolean withDetail)
RelDataTypeImplgenerateTypeString in class RelDataTypeImplsb - 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;public boolean isStruct()
RelDataTypeisStruct in interface RelDataTypeisStruct in class RelDataTypeImplpublic RelDataTypeFamily getFamily()
RelDataTypegetFamily in interface RelDataTypegetFamily in class RelDataTypeImplCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.