public class RelRecordType extends RelDataTypeImpl implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
private static class |
RelRecordType.SerializableRelRecordType
Skinny object which has the same information content as a
RelRecordType but skips redundant stuff like digest and the
immutable list. |
Modifier and Type | Field and Description |
---|---|
private StructKind |
kind
Name resolution policy; usually
StructKind.FULLY_QUALIFIED . |
private boolean |
nullable |
digest, fieldList
PRECISION_NOT_SPECIFIED, SCALE_NOT_SPECIFIED
Constructor and Description |
---|
RelRecordType(java.util.List<RelDataTypeField> fields)
Creates a
RecordType . |
RelRecordType(StructKind kind,
java.util.List<RelDataTypeField> fields)
Creates a
RecordType . |
RelRecordType(StructKind kind,
java.util.List<RelDataTypeField> fields,
boolean nullable)
Creates a
RecordType . |
Modifier and Type | Method and Description |
---|---|
protected void |
generateTypeString(java.lang.StringBuilder sb,
boolean withDetail)
Generates a string representation of this type.
|
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.
|
private java.lang.Object |
writeReplace()
Per
Serializable API, provides a replacement object to be written
during serialization. |
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, toString
private final StructKind kind
StructKind.FULLY_QUALIFIED
.private final boolean nullable
public RelRecordType(StructKind kind, java.util.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, java.util.List<RelDataTypeField> fields)
RecordType
. This should only be called from a
factory method.
Shorthand for RelRecordType(kind, fields, false)
.public RelRecordType(java.util.List<RelDataTypeField> fields)
RecordType
. This should only be called from a
factory method.
Shorthand for RelRecordType(StructKind.FULLY_QUALIFIED, fields, false)
.public SqlTypeName getSqlTypeName()
RelDataType
SqlTypeName
of this type.getSqlTypeName
in interface RelDataType
getSqlTypeName
in class RelDataTypeImpl
public boolean isNullable()
RelDataType
isNullable
in interface RelDataType
isNullable
in class RelDataTypeImpl
public int getPrecision()
RelDataType
Returns RelDataType.PRECISION_NOT_SPECIFIED
(-1) if precision is not
applicable for this type.
getPrecision
in interface RelDataType
getPrecision
in class RelDataTypeImpl
public StructKind getStructKind()
RelDataType
StructKind.NONE
if this is not a structured type.getStructKind
in interface RelDataType
getStructKind
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;private java.lang.Object writeReplace()
Serializable
API, provides a replacement object to be written
during serialization.
This implementation converts this RelRecordType into a
SerializableRelRecordType, whose readResolve
method converts
it back to a RelRecordType during deserialization.
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.