public class RelRecordType extends RelDataTypeImpl implements Serializable
digest, fieldList, NON_NULLABLE_SUFFIXPRECISION_NOT_SPECIFIED, SCALE_NOT_SPECIFIED| Constructor and Description |
|---|
RelRecordType(List<RelDataTypeField> fields)
Creates a
RecordType. |
RelRecordType(StructKind kind,
List<RelDataTypeField> fields)
Creates a
RecordType. |
RelRecordType(StructKind kind,
List<RelDataTypeField> fields,
boolean nullable)
Creates a
RecordType. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
generateTypeString(StringBuilder sb,
boolean withDetail)
Generates a string representation of this type.
|
protected @Nullable Map<String,RelDataTypeField> |
getFieldMap()
Returns a map from field names to fields.
|
int |
getPrecision()
Gets the JDBC-defined precision for values of this type.
|
SqlTypeName |
getSqlTypeName()
Gets the
SqlTypeName of this type. |
StructKind |
getStructKind()
Returns the rule for resolving the fields of a structured type,
or
StructKind.NONE if this is not a structured type. |
boolean |
isNullable()
Queries whether this type allows null values.
|
computeDigest, equals, extra, getCharset, getCollation, getComparability, getComponentType, getFamily, getField, getFieldCount, getFieldList, getFieldNames, getFullTypeString, getIntervalQualifier, getKeyType, getPrecedenceList, getScale, getSqlIdentifier, getValueType, hashCode, isDynamicStruct, isStruct, proto, proto, proto, proto, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitequalsSansFieldNamespublic RelRecordType(StructKind kind, List<RelDataTypeField> fields, boolean nullable)
RecordType. This should only be called from a
factory method.kind - Name resolution policyfields - List of fieldsnullable - Whether this record type allows null valuespublic RelRecordType(StructKind kind, List<RelDataTypeField> fields)
RecordType. This should only be called from a
factory method.
Shorthand for RelRecordType(kind, fields, false).public RelRecordType(List<RelDataTypeField> fields)
RecordType. This should only be called from a
factory method.
Shorthand for RelRecordType(StructKind.FULLY_QUALIFIED, fields, false).public 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 boolean isNullable()
RelDataTypeisNullable in interface RelDataTypeisNullable in class RelDataTypeImplpublic int getPrecision()
RelDataTypeReturns RelDataType.PRECISION_NOT_SPECIFIED (-1) if precision is not
applicable for this type.
getPrecision in interface RelDataTypegetPrecision in class RelDataTypeImplpublic StructKind getStructKind()
RelDataTypeStructKind.NONE if this is not a structured type.getStructKind in interface RelDataTypegetStructKind in class RelDataTypeImplprotected @Nullable Map<String,RelDataTypeField> getFieldMap()
RelDataTypeImplMatching is case-sensitive.
If several fields have the same name, the map contains the first.
A dynamic star field is indexed
under its own name and "" (the empty string).
If the map is null, the type must do lookup the long way.
getFieldMap 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;Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.