Class RowTypeInfo

    • Field Detail

      • fieldNames

        protected final String[] fieldNames
    • Method Detail

      • getFlatFields

        public void getFlatFields​(String fieldExpression,
                                  int offset,
                                  List<CompositeType.FlatFieldDescriptor> result)
        Description copied from class: CompositeType
        Computes the flat field descriptors for the given field expression with the given offset.
        Overrides:
        getFlatFields in class TupleTypeInfoBase<Row>
        Parameters:
        fieldExpression - The field expression for which the FlatFieldDescriptors are computed.
        offset - The offset to use when computing the positions of the flat fields.
        result - The list into which all flat field descriptors are inserted.
      • getTypeAt

        public <X> TypeInformation<X> getTypeAt​(String fieldExpression)
        Description copied from class: CompositeType
        Returns the type of the (nested) field at the given field expression position. Wildcards are not allowed.
        Overrides:
        getTypeAt in class TupleTypeInfoBase<Row>
        Parameters:
        fieldExpression - The field expression for which the field of which the type is returned.
        Returns:
        The type of the field at the given field expression.
      • createComparator

        public TypeComparator<Row> createComparator​(int[] logicalKeyFields,
                                                    boolean[] orders,
                                                    int logicalFieldOffset,
                                                    ExecutionConfig config)
        Description copied from class: CompositeType
        Generic implementation of the comparator creation. Composite types are supplying the infrastructure to create the actual comparators
        Overrides:
        createComparator in class CompositeType<Row>
        Returns:
        The comparator
      • getFieldNames

        public String[] getFieldNames()
        Description copied from class: CompositeType
        Returns the names of the composite fields of this type. The order of the returned array must be consistent with the internal field index ordering.
        Specified by:
        getFieldNames in class CompositeType<Row>
      • getFieldIndex

        public int getFieldIndex​(String fieldName)
        Description copied from class: CompositeType
        Returns the field index of the composite field of the given name.
        Specified by:
        getFieldIndex in class CompositeType<Row>
        Returns:
        The field index or -1 if this type does not have a field of the given name.
      • createSerializer

        public TypeSerializer<Row> createSerializer​(ExecutionConfig config)
        Description copied from class: TypeInformation
        Creates a serializer for the type. The serializer may use the ExecutionConfig for parameterization.
        Specified by:
        createSerializer in class TypeInformation<Row>
        Parameters:
        config - The config used to parameterize the serializer.
        Returns:
        A serializer for this type.
      • canEqual

        public boolean canEqual​(Object obj)
        Description copied from class: TypeInformation
        Returns true if the given object can be equaled with this object. If not, it returns false.
        Overrides:
        canEqual in class TupleTypeInfoBase<Row>
        Parameters:
        obj - Object which wants to take part in the equality relation
        Returns:
        true if obj can be equaled with this, otherwise false
      • equals

        public boolean equals​(Object obj)
        The equals method does only check for field types. Field names do not matter during runtime so we can consider rows with the same field types as equal. Use schemaEquals(Object) for checking schema-equivalence.
        Overrides:
        equals in class TupleTypeInfoBase<Row>
      • schemaEquals

        public boolean schemaEquals​(Object obj)
        Tests whether an other object describes the same, schema-equivalent row information.
      • projectFields

        public static RowTypeInfo projectFields​(RowTypeInfo rowType,
                                                int[] fieldMapping)
        Creates a RowTypeInfo with projected fields.
        Parameters:
        rowType - The original RowTypeInfo whose fields are projected
        fieldMapping - The field mapping of the projection
        Returns:
        A RowTypeInfo with projected fields.