Class RelRecordType

    • Constructor Detail

      • RelRecordType

        public RelRecordType​(StructKind kind,
                             java.util.List<RelDataTypeField> fields,
                             boolean nullable)
        Creates a RecordType. This should only be called from a factory method.
        Parameters:
        kind - Name resolution policy
        fields - List of fields
        nullable - Whether this record type allows null values
      • RelRecordType

        public RelRecordType​(StructKind kind,
                             java.util.List<RelDataTypeField> fields)
        Creates a RecordType. This should only be called from a factory method. Shorthand for RelRecordType(kind, fields, false).
      • RelRecordType

        public RelRecordType​(java.util.List<RelDataTypeField> fields)
        Creates a RecordType. This should only be called from a factory method. Shorthand for RelRecordType(StructKind.FULLY_QUALIFIED, fields, false).
    • Method Detail

      • getPrecision

        public int getPrecision()
        Description copied from interface: RelDataType
        Gets the JDBC-defined precision for values of this type. Note that this is not always the same as the user-specified precision. For example, the type INTEGER has no user-specified precision, but this method returns 10 for an INTEGER type.

        Returns RelDataType.PRECISION_NOT_SPECIFIED (-1) if precision is not applicable for this type.

        Specified by:
        getPrecision in interface RelDataType
        Overrides:
        getPrecision in class RelDataTypeImpl
        Returns:
        number of decimal digits for exact numeric types; number of decimal digits in mantissa for approximate numeric types; number of decimal digits for fractional seconds of datetime types; length in characters for character types; length in bytes for binary types; length in bits for bit types; 1 for BOOLEAN; -1 if precision is not valid for this type
      • generateTypeString

        protected void generateTypeString​(java.lang.StringBuilder sb,
                                          boolean withDetail)
        Description copied from class: RelDataTypeImpl
        Generates a string representation of this type.
        Specified by:
        generateTypeString in class RelDataTypeImpl
        Parameters:
        sb - StringBuilder into which to generate the string
        withDetail - when true, all detail information needed to compute a unique digest (and return from getFullTypeString) should be included;
      • writeReplace

        private java.lang.Object writeReplace()
        Per 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.