Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/572#discussion_r28696843 --- Diff: flink-tests/src/test/java/org/apache/flink/test/javaApiOperators/GroupReduceITCase.java --- @@ -1063,6 +1065,33 @@ public void reduce(Iterable<Tuple5<Integer, Long, Integer, String, Long>> values } + @Test + public void testGroupReduceWithAtomicValue() throws Exception { + final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); + DataSet<Integer> ds = env.fromElements(1, 1, 2, 3, 4); + DataSet<Integer> reduceDs = ds.groupBy("*").reduceGroup(new GroupReduceFunction<Integer, Integer>() { + @Override + public void reduce(Iterable<Integer> values, Collector<Integer> out) throws Exception { + Set<Integer> set = new HashSet<Integer>(); --- End diff -- Since all elements of a group are identical when you do `groupBy("*")` this could be implemented a bit easier by just returning the first element of a group (`out.collect(values.iterator().next())`).
--- 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. ---