flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fhueske <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-2479] Refactor runtime.operators.* test...
Date Tue, 06 Oct 2015 15:36:14 GMT
Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1160#discussion_r41280508
  
    --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/operators/hash/NonReusingHashMatchIteratorITCase.java
---
    @@ -735,33 +726,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


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