[ 
https://issues.apache.org/jira/browse/FLINK-2479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14945201#comment-14945201
 ] 

ASF GitHub Bot commented on FLINK-2479:
---------------------------------------

Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1160#discussion_r41280171
  
    --- Diff: 
flink-runtime/src/test/java/org/apache/flink/runtime/operators/hash/ReusingHashMatchIteratorITCase.java
 ---
    @@ -735,33 +728,31 @@ public void setReference(IntPair reference) {
                }
     
                @Override
    -           public boolean equalToReference(Record candidate) {
    +           public boolean equalToReference(Tuple2<Integer, String> 
candidate) {
                        try {
    -                           final IntValue i = candidate.getField(0, 
IntValue.class);
    -                           return i.getValue() == this.reference;
    +                           return candidate.f0 == this.reference;
                        } catch (NullPointerException npex) {
                                throw new NullKeyFieldException();
                        }
                }
     
                @Override
    -           public int compareToReference(Record candidate) {
    +           public int compareToReference(Tuple2<Integer, String> 
candidate) {
                        try {
    -                           final IntValue i = candidate.getField(0, 
IntValue.class);
    -                           return i.getValue() - this.reference;
    +                           return candidate.f0 - this.reference;
                        } catch (NullPointerException npex) {
                                throw new NullKeyFieldException();
                        }
                }
        }
        
    -   static final class RecordIntPairPairComparator extends 
TypePairComparator<Record, IntPair>
    +   static final class RecordIntPairPairComparator extends 
TypePairComparator<Tuple2<Integer, String>, IntPair>
    --- End diff --
    
    TupleIntPairPairComparator


> Refactoring of org.apache.flink.runtime.operators.testutils.TestData class
> --------------------------------------------------------------------------
>
>                 Key: FLINK-2479
>                 URL: https://issues.apache.org/jira/browse/FLINK-2479
>             Project: Flink
>          Issue Type: Task
>          Components: Local Runtime
>            Reporter: Ricky Pogalz
>            Assignee: Chesnay Schepler
>            Priority: Minor
>             Fix For: pre-apache
>
>
> Currently, there are still tests which use {{Record}} from the old record 
> API. One of the test util classes is {{TestData}}, including {{Generator}} 
> and some other classes still using {{Record}}. An alternative implementation 
> of the {{Generator}} without {{Record}} already exists in the {{TestData}} 
> class, namely {{TupleGenerator}}.
> Please replace the utility classes in {{TestData}} that still use {{Record}} 
> and adapt all of its usages.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to