Github user mxm commented on a diff in the pull request:

    https://github.com/apache/flink/pull/466#discussion_r26120661
  
    --- Diff: 
flink-java/src/main/java/org/apache/flink/api/java/operators/SortedGrouping.java
 ---
    @@ -156,6 +156,23 @@ public SortedGrouping(DataSet<T> set, Keys<T> keys, 
String field, Order order) {
                return new GroupReduceOperator<T, R>(this, resultType, 
dataSet.clean(reducer), Utils.getCallLocationName() );
        }
     
    +   /**
    +    * Applies a partial GroupReduce transformation on a grouped and sorted 
{@link DataSet}.
    +    *
    +    * In contrast to the reduceGroup transformation, the GroupReduce 
function is only called on each partition. Thus,
    +    * partial solutions are likely to occur.
    +    * @param reducer The ReduceFunction that is applied on the DataSet.
    +    * @return A GroupReducePartial operator which represents the partially 
reduced DataSet.
    +    */
    +   public <R> GroupReducePartialOperator<T, R> 
reduceGroupPartially(GroupReduceFunction<T, R> reducer) {
    +           if (reducer == null) {
    +                   throw new NullPointerException("GroupReduce function 
must not be null.");
    +           }
    +           TypeInformation<R> resultType = 
TypeExtractor.getGroupReduceReturnTypes(reducer, this.getDataSet().getType());
    +
    +           return new GroupReducePartialOperator<T, R>(this, resultType, 
dataSet.clean(reducer), Utils.getCallLocationName());
    +   }
    +
    --- End diff --
    
    We need a grouping to combine the correct values, don't we? Otherwise, we 
would perform an AllReduce.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to