Class LocalProperties

  • All Implemented Interfaces:
    Cloneable

    public class LocalProperties
    extends Object
    implements Cloneable
    This class represents local properties of the data. A local property is a property that exists within the data of a single partition, such as sort order, or data grouping.
    • Field Detail

      • LOG

        public static final org.slf4j.Logger LOG
    • Constructor Detail

      • LocalProperties

        public LocalProperties()
        Default constructor for trivial local properties. No order, no grouping, no uniqueness.
    • Method Detail

      • getOrdering

        public org.apache.flink.api.common.operators.Ordering getOrdering()
        Gets the key order.
        Returns:
        The key order, or null if nothing is ordered.
      • getGroupedFields

        public org.apache.flink.api.common.operators.util.FieldList getGroupedFields()
        Gets the grouped fields.
        Returns:
        The grouped fields, or null if nothing is grouped.
      • getUniqueFields

        public Set<org.apache.flink.api.common.operators.util.FieldSet> getUniqueFields()
        Gets the fields whose combination is unique within the data set.
        Returns:
        The unique field combination, or null if nothing is unique.
      • areFieldsUnique

        public boolean areFieldsUnique​(org.apache.flink.api.common.operators.util.FieldSet set)
        Checks whether the given set of fields is unique, as specified in these local properties.
        Parameters:
        set - The set to check.
        Returns:
        True, if the given column combination is unique, false if not.
      • addUniqueFields

        public LocalProperties addUniqueFields​(org.apache.flink.api.common.operators.util.FieldSet uniqueFields)
        Adds a combination of fields that are unique in these data properties.
        Parameters:
        uniqueFields - The fields that are unique in these data properties.
      • isTrivial

        public boolean isTrivial()
        Checks, if the properties in this object are trivial, i.e. only standard values.
      • filterBySemanticProperties

        public LocalProperties filterBySemanticProperties​(org.apache.flink.api.common.operators.SemanticProperties props,
                                                          int input)
        Filters these LocalProperties by the fields that are forwarded to the output as described by the SemanticProperties.
        Parameters:
        props - The semantic properties holding information about forwarded fields.
        input - The index of the input.
        Returns:
        The filtered LocalProperties
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • forOrdering

        public static LocalProperties forOrdering​(org.apache.flink.api.common.operators.Ordering o)
      • forGrouping

        public static LocalProperties forGrouping​(org.apache.flink.api.common.operators.util.FieldList groupedFields)