flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chiwanpark <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-703] Use complete element as join key
Date Mon, 20 Apr 2015 15:35:24 GMT
Github user chiwanpark commented on a diff in the pull request:

    https://github.com/apache/flink/pull/572#discussion_r28699341
  
    --- 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>();
    +				for (Integer i : values) {
    +					set.add(i);
    +				}
    +				for (Integer i : set) {
    +					out.collect(i);
    +				}
    +			}
    +		});
    +
    +		env.setParallelism(1);
    --- End diff --
    
    Oh, I just copied code from other test case. I will fix it :)


---
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