flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject [3/9] git commit: [FLINK-1074] Fix for NULL input tuples in ProjectJoin
Date Tue, 09 Sep 2014 23:42:20 GMT
[FLINK-1074] Fix for NULL input tuples in ProjectJoin


Project: http://git-wip-us.apache.org/repos/asf/incubator-flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-flink/commit/8af40c32
Tree: http://git-wip-us.apache.org/repos/asf/incubator-flink/tree/8af40c32
Diff: http://git-wip-us.apache.org/repos/asf/incubator-flink/diff/8af40c32

Branch: refs/heads/release-0.6.1
Commit: 8af40c3225f7844cfaa614e71ea9373e32ce3f57
Parents: 7853a84
Author: Fabian Hueske <fhueske@apache.org>
Authored: Thu Aug 28 10:38:53 2014 +0200
Committer: uce <u.celebi@fu-berlin.de>
Committed: Wed Sep 10 00:43:47 2014 +0200

----------------------------------------------------------------------
 .../java/org/apache/flink/api/java/operators/JoinOperator.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/8af40c32/flink-java/src/main/java/org/apache/flink/api/java/operators/JoinOperator.java
----------------------------------------------------------------------
diff --git a/flink-java/src/main/java/org/apache/flink/api/java/operators/JoinOperator.java
b/flink-java/src/main/java/org/apache/flink/api/java/operators/JoinOperator.java
index 6ffbd1b..2efe7e9 100644
--- a/flink-java/src/main/java/org/apache/flink/api/java/operators/JoinOperator.java
+++ b/flink-java/src/main/java/org/apache/flink/api/java/operators/JoinOperator.java
@@ -925,13 +925,13 @@ public abstract class JoinOperator<I1, I2, OUT> extends TwoInputUdfOperator<I1,
 		public void join(T1 in1, T2 in2, Collector<R> out) {
 			for(int i=0; i<fields.length; i++) {
 				if(isFromFirst[i]) {
-					if(fields[i] >= 0) {
+					if(fields[i] >= 0 && in1 != null) {
 						outTuple.setField(((Tuple)in1).getField(fields[i]), i);
 					} else {
 						outTuple.setField(in1, i);
 					}
 				} else {
-					if(fields[i] >= 0) {
+					if(fields[i] >= 0 && in2 != null) {
 						outTuple.setField(((Tuple)in2).getField(fields[i]), i);
 					} else {
 						outTuple.setField(in2, i);


Mime
View raw message