flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gyf...@apache.org
Subject [3/3] flink git commit: [FLINK-1757] [streaming] Fixed type cast bug in SumFunction
Date Fri, 20 Mar 2015 13:56:48 GMT
[FLINK-1757] [streaming] Fixed type cast bug in SumFunction


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

Branch: refs/heads/master
Commit: 22e00655fa70a4986b87b1cde6f998b2baaf0507
Parents: a6da9f2
Author: szape <nemderogatorius@gmail.com>
Authored: Fri Mar 20 13:58:07 2015 +0100
Committer: szape <nemderogatorius@gmail.com>
Committed: Fri Mar 20 14:01:50 2015 +0100

----------------------------------------------------------------------
 .../flink/streaming/api/function/aggregation/SumFunction.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/22e00655/flink-staging/flink-streaming/flink-streaming-core/src/main/java/org/apache/flink/streaming/api/function/aggregation/SumFunction.java
----------------------------------------------------------------------
diff --git a/flink-staging/flink-streaming/flink-streaming-core/src/main/java/org/apache/flink/streaming/api/function/aggregation/SumFunction.java
b/flink-staging/flink-streaming/flink-streaming-core/src/main/java/org/apache/flink/streaming/api/function/aggregation/SumFunction.java
index 2aef19c..bc851e7 100644
--- a/flink-staging/flink-streaming/flink-streaming-core/src/main/java/org/apache/flink/streaming/api/function/aggregation/SumFunction.java
+++ b/flink-staging/flink-streaming/flink-streaming-core/src/main/java/org/apache/flink/streaming/api/function/aggregation/SumFunction.java
@@ -78,7 +78,7 @@ public abstract class SumFunction implements Serializable{
 
 		@Override
 		public Object add(Object value1, Object value2) {
-			return (Short) value1 + (Short) value2;
+			return (short) ((Short) value1 + (Short) value2);
 		}
 	}
 
@@ -96,7 +96,7 @@ public abstract class SumFunction implements Serializable{
 
 		@Override
 		public Object add(Object value1, Object value2) {
-			return (Byte) value1 + (Byte) value2;
+			return (byte) ((Byte) value1 + (Byte) value2);
 		}
 	}
 }


Mime
View raw message