Class CompositeType<T>

    • Method Detail

      • getFlatFields

        @PublicEvolving
        public List<CompositeType.FlatFieldDescriptor> getFlatFields​(String fieldExpression)
        Returns the flat field descriptors for the given field expression.
        Parameters:
        fieldExpression - The field expression for which the flat field descriptors are computed.
        Returns:
        The list of descriptors for the flat fields which are specified by the field expression.
      • getFlatFields

        @PublicEvolving
        public abstract void getFlatFields​(String fieldExpression,
                                           int offset,
                                           List<CompositeType.FlatFieldDescriptor> result)
        Computes the flat field descriptors for the given field expression with the given offset.
        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

        @PublicEvolving
        public abstract <X> TypeInformation<X> getTypeAt​(String fieldExpression)
        Returns the type of the (nested) field at the given field expression position. Wildcards are not allowed.
        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.
      • getTypeAt

        @PublicEvolving
        public abstract <X> TypeInformation<X> getTypeAt​(int pos)
        Returns the type of the (unnested) field at the given field position.
        Parameters:
        pos - The position of the (unnested) field in this composite type.
        Returns:
        The type of the field at the given position.
      • createComparator

        @PublicEvolving
        public TypeComparator<T> createComparator​(int[] logicalKeyFields,
                                                  boolean[] orders,
                                                  int logicalFieldOffset,
                                                  ExecutionConfig config)
        Generic implementation of the comparator creation. Composite types are supplying the infrastructure to create the actual comparators
        Returns:
        The comparator
      • hasField

        @PublicEvolving
        public boolean hasField​(String fieldName)
        Returns true when this type has a composite field with the given name.
      • isKeyType

        @PublicEvolving
        public boolean isKeyType()
        Description copied from class: TypeInformation
        Checks whether this type can be used as a key. As a bare minimum, types have to be hashable and comparable to be keys.
        Specified by:
        isKeyType in class TypeInformation<T>
        Returns:
        True, if the type can be used as a key, false otherwise.
      • getFieldNames

        @PublicEvolving
        public abstract String[] getFieldNames()
        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.
      • hasDeterministicFieldOrder

        @PublicEvolving
        public boolean hasDeterministicFieldOrder()
        True if this type has an inherent ordering of the fields, such that a user can always be sure in which order the fields will be in. This is true for Tuples and Case Classes. It is not true for Regular Java Objects, since there, the ordering of the fields can be arbitrary.

        This is used when translating a DataSet or DataStream to an Expression Table, when initially renaming the fields of the underlying type.

      • getFieldIndex

        @PublicEvolving
        public abstract int getFieldIndex​(String fieldName)
        Returns the field index of the composite field of the given name.
        Returns:
        The field index or -1 if this type does not have a field of the given name.
      • 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.
        Specified by:
        canEqual in class TypeInformation<T>
        Parameters:
        obj - Object which wants to take part in the equality relation
        Returns:
        true if obj can be equaled with this, otherwise false