[
https://issues.apache.org/jira/browse/FLINK-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15249730#comment-15249730
]
ASF GitHub Bot commented on FLINK-2998:
---------------------------------------
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/1838#discussion_r60395647
--- Diff:
flink-tests/src/test/java/org/apache/flink/test/javaApiOperators/CoGroupITCase.java
---
@@ -797,4 +873,46 @@ public void coGroup(Iterable<Integer> first,
Iterable<Tuple3<Integer, Long, Stri
}
}
}
+
+ public static class TestDistribution implements DataDistribution {
+ public Integer boundaries[][] = new Integer[][]{
+ new Integer[]{2, 2},
+ new Integer[]{5, 4},
+ new Integer[]{10, 12},
+ new Integer[]{21, 6}
+ };
+
+ public TestDistribution() {}
+
+ @Override
+ public Object[] getBucketBoundary(int bucketNum, int
totalNumBuckets) {
+ return boundaries[bucketNum];
+ }
+
+ @Override
+ public int getNumberOfFields() {
+ return 2;
+ }
+
+ @Override
+ public TypeInformation[] getKeyTypes() {
+ return new
TypeInformation[]{BasicTypeInfo.INT_TYPE_INFO, BasicTypeInfo.INT_TYPE_INFO};
+ }
+
+ @Override
+ public void write(DataOutputView out) throws IOException {
+
+ }
+
+ @Override
+ public void read(DataInputView in) throws IOException {
+
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ // The test is running with same distribution, so
return true directly
+ return true;
--- End diff --
That is true.
Could you change it to `obj instanceof TestDistribution` nonetheless?
Sometimes test code is copied and this could be a bit dangerous ;-)
> Support range partition comparison for multi input nodes.
> ---------------------------------------------------------
>
> Key: FLINK-2998
> URL: https://issues.apache.org/jira/browse/FLINK-2998
> Project: Flink
> Issue Type: New Feature
> Components: Optimizer
> Reporter: Chengxiang Li
> Priority: Minor
>
> The optimizer may have potential opportunity to optimize the DAG while it
> found two input range partition are equivalent, we does not support the
> comparison yet.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)