flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aljoscha <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-1622][java-api][scala-api] add a partia...
Date Tue, 10 Mar 2015 08:39:42 GMT
Github user aljoscha commented on a diff in the pull request:

    https://github.com/apache/flink/pull/466#discussion_r26105136
  
    --- 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 --
    
    Why do we have this here. Partial GroupReduce doesn't make sense on a grouping. Thats's
what a regular GroupReduce is. Or am I missing something?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message