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


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to