Class CoGroupOperator.CoGroupOperatorSets.CoGroupOperatorSetsPredicate.CoGroupOperatorWithoutFunction

    • Method Detail

      • withPartitioner

        public CoGroupOperator.CoGroupOperatorSets.CoGroupOperatorSetsPredicate.CoGroupOperatorWithoutFunction withPartitioner​(org.apache.flink.api.common.functions.Partitioner<?> partitioner)
        Sets a custom partitioner for the CoGroup operation. The partitioner will be called on the join keys to determine the partition a key should be assigned to. The partitioner is evaluated on both inputs in the same way.

        NOTE: A custom partitioner can only be used with single-field CoGroup keys, not with composite CoGroup keys.

        Parameters:
        partitioner - The custom partitioner to be used.
        Returns:
        This CoGroup operator, to allow for function chaining.
      • getPartitioner

        public org.apache.flink.api.common.functions.Partitioner<?> getPartitioner()
        Gets the custom partitioner used by this join, or null, if none is set.
        Returns:
        The custom partitioner used by this join;
      • with

        public <R> CoGroupOperator<I1,​I2,​R> with​(org.apache.flink.api.common.functions.CoGroupFunction<I1,​I2,​R> function)
        Finalizes a CoGroup transformation by applying a RichCoGroupFunction to groups of elements with identical keys.

        Each CoGroupFunction call returns an arbitrary number of keys.

        Parameters:
        function - The CoGroupFunction that is called for all groups of elements with identical keys.
        Returns:
        An CoGroupOperator that represents the co-grouped result DataSet.
        See Also:
        RichCoGroupFunction, DataSet
      • sortFirstGroup

        public CoGroupOperator.CoGroupOperatorSets.CoGroupOperatorSetsPredicate.CoGroupOperatorWithoutFunction sortFirstGroup​(int field,
                                                                                                                              org.apache.flink.api.common.operators.Order order)
        Sorts Tuple elements within a group in the first input on the specified field in the specified Order.

        Note: Only groups of Tuple elements and Pojos can be sorted.

        Groups can be sorted by multiple fields by chaining sortFirstGroup(int, Order) calls.

        Parameters:
        field - The Tuple field on which the group is sorted.
        order - The Order in which the specified Tuple field is sorted.
        Returns:
        A SortedGrouping with specified order of group element.
        See Also:
        Tuple, Order
      • sortSecondGroup

        public CoGroupOperator.CoGroupOperatorSets.CoGroupOperatorSetsPredicate.CoGroupOperatorWithoutFunction sortSecondGroup​(int field,
                                                                                                                               org.apache.flink.api.common.operators.Order order)
        Sorts Tuple elements within a group in the second input on the specified field in the specified Order.

        Note: Only groups of Tuple elements and Pojos can be sorted.

        Groups can be sorted by multiple fields by chaining sortSecondGroup(int, Order) calls.

        Parameters:
        field - The Tuple field on which the group is sorted.
        order - The Order in which the specified Tuple field is sorted.
        Returns:
        A SortedGrouping with specified order of group element.
        See Also:
        Tuple, Order
      • sortFirstGroup

        public CoGroupOperator.CoGroupOperatorSets.CoGroupOperatorSetsPredicate.CoGroupOperatorWithoutFunction sortFirstGroup​(String fieldExpression,
                                                                                                                              org.apache.flink.api.common.operators.Order order)
        Sorts Pojo or Tuple elements within a group in the first input on the specified field in the specified Order.

        Groups can be sorted by multiple fields by chaining sortFirstGroup(String, Order) calls.

        Parameters:
        fieldExpression - The expression to the field on which the group is to be sorted.
        order - The Order in which the specified Tuple field is sorted.
        Returns:
        A SortedGrouping with specified order of group element.
        See Also:
        Order
      • sortSecondGroup

        public CoGroupOperator.CoGroupOperatorSets.CoGroupOperatorSetsPredicate.CoGroupOperatorWithoutFunction sortSecondGroup​(String fieldExpression,
                                                                                                                               org.apache.flink.api.common.operators.Order order)
        Sorts Pojo or Tuple elements within a group in the second input on the specified field in the specified Order.

        Groups can be sorted by multiple fields by chaining sortSecondGroup(String, Order) calls.

        Parameters:
        fieldExpression - The expression to the field on which the group is to be sorted.
        order - The Order in which the specified Tuple field is sorted.
        Returns:
        A SortedGrouping with specified order of group element.
        See Also:
        Order