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_PREFIX
digest, fieldList
PRECISION_NOT_SPECIFIED, SCALE_NOT_SPECIFIED
Constructor and Description |
---|
DynamicRecordTypeImpl(RelDataTypeFactory typeFactory)
Creates a DynamicRecordTypeImpl.
|
Modifier and Type | Method and Description |
---|---|
protected void |
generateTypeString(java.lang.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(java.lang.String fieldName,
boolean caseSensitive,
boolean elideRecord)
Looks up a field by name.
|
int |
getFieldCount()
Returns the number of fields in a struct type.
|
java.util.List<RelDataTypeField> |
getFieldList()
Gets the fields in a struct type.
|
java.util.List<java.lang.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, isDynamicStruct
computeDigest, equals, extra, getCharset, getCollation, getComparability, getComponentType, getFullTypeString, getIntervalQualifier, getKeyType, getPrecision, getScale, getSqlIdentifier, getStructKind, getValueType, hashCode, isNullable, proto, proto, proto, proto, toString
private final RelDataTypeHolder holder
public DynamicRecordTypeImpl(RelDataTypeFactory typeFactory)
public java.util.List<RelDataTypeField> getFieldList()
RelDataType
getFieldList
in interface RelDataType
getFieldList
in class RelDataTypeImpl
public int getFieldCount()
RelDataType
This method is equivalent to
.RelDataType.getFieldList()
.size()
getFieldCount
in interface RelDataType
getFieldCount
in class RelDataTypeImpl
public RelDataTypeField getField(java.lang.String fieldName, boolean caseSensitive, boolean elideRecord)
RelDataType
NOTE: 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 RelDataType
getField
in class RelDataTypeImpl
fieldName
- Name of field to findcaseSensitive
- Whether match is case-sensitiveelideRecord
- Whether to find fields nested within recordspublic java.util.List<java.lang.String> getFieldNames()
RelDataType
getFieldNames
in interface RelDataType
getFieldNames
in class RelDataTypeImpl
public SqlTypeName getSqlTypeName()
RelDataType
SqlTypeName
of this type.getSqlTypeName
in interface RelDataType
getSqlTypeName
in class RelDataTypeImpl
public RelDataTypePrecedenceList getPrecedenceList()
getPrecedenceList
in interface RelDataType
getPrecedenceList
in class RelDataTypeImpl
protected void generateTypeString(java.lang.StringBuilder sb, boolean withDetail)
RelDataTypeImpl
generateTypeString
in class RelDataTypeImpl
sb
- 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()
RelDataType
isStruct
in interface RelDataType
isStruct
in class RelDataTypeImpl
public RelDataTypeFamily getFamily()
RelDataType
getFamily
in interface RelDataType
getFamily
in class RelDataTypeImpl
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.