[
https://issues.apache.org/jira/browse/FLINK-3254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15126338#comment-15126338
]
ASF GitHub Bot commented on FLINK-3254:
---------------------------------------
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/1568#discussion_r51427090
--- Diff:
flink-java/src/main/java/org/apache/flink/api/java/operators/GroupReduceOperator.java
---
@@ -156,8 +162,8 @@ public boolean isCombinable() {
public GroupReduceOperator<IN, OUT> setCombinable(boolean combinable) {
// sanity check that the function is a subclass of the combine
interface
- if (combinable && !(function instanceof GroupCombineFunction)) {
- throw new IllegalArgumentException("The function does
not implement the combine interface.");
+ if (combinable && !(function instanceof GroupCombineFunction ||
function instanceof CombineFunction)) {
--- End diff --
If we change the `checkCombinability` method to return a boolean instead of
setting `this.combinable` directly, we can also use it here.
> CombineFunction interface not respected
> ---------------------------------------
>
> Key: FLINK-3254
> URL: https://issues.apache.org/jira/browse/FLINK-3254
> Project: Flink
> Issue Type: Bug
> Components: DataSet API
> Affects Versions: 1.0.0, 0.10.1
> Reporter: Fabian Hueske
> Assignee: Kostas
> Priority: Blocker
> Fix For: 1.0.0
>
>
> The DataSet API offers a {{CombineFunction}} interface, which differs from
> the {{GroupCombineFunction}} interface by being restricted to return a single
> value instead of returning arbitrary many values through a {{Collector}}.
> The JavaDocs of the {{GroupCombineFunction}} point to the {{CombineFunction}}
> interface, advertising it as more efficient.
> However, the {{CombineFunction}} interface is nor respected by Flink, i.e., a
> {{GroupReduceFunction}} that implements this interface is executed without
> leveraging the combine method.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)