flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fhue...@apache.org
Subject flink git commit: [FLINK-3866] StringArraySerializer does not treat type as immutable.
Date Tue, 23 Aug 2016 14:23:18 GMT
Repository: flink
Updated Branches:
  refs/heads/master a497ebc80 -> 502ae585c


[FLINK-3866] StringArraySerializer does not treat type as immutable.

This closes #2289


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

Branch: refs/heads/master
Commit: 502ae585c13b67a2510ca27d5b02fb09f288e15b
Parents: a497ebc
Author: Ivan Mushketyk <ivan.mushketik@gmail.com>
Authored: Sat Jul 23 10:39:24 2016 +0100
Committer: Fabian Hueske <fhueske@apache.org>
Committed: Tue Aug 23 12:09:57 2016 +0200

----------------------------------------------------------------------
 .../common/typeutils/base/array/StringArraySerializer.java  | 2 +-
 .../typeutils/base/array/StringArraySerializerTest.java     | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/502ae585/flink-core/src/main/java/org/apache/flink/api/common/typeutils/base/array/StringArraySerializer.java
----------------------------------------------------------------------
diff --git a/flink-core/src/main/java/org/apache/flink/api/common/typeutils/base/array/StringArraySerializer.java
b/flink-core/src/main/java/org/apache/flink/api/common/typeutils/base/array/StringArraySerializer.java
index 642cc1c..ccf369a 100644
--- a/flink-core/src/main/java/org/apache/flink/api/common/typeutils/base/array/StringArraySerializer.java
+++ b/flink-core/src/main/java/org/apache/flink/api/common/typeutils/base/array/StringArraySerializer.java
@@ -42,7 +42,7 @@ public final class StringArraySerializer extends TypeSerializerSingleton<String[
 	
 	@Override
 	public boolean isImmutableType() {
-		return true;
+		return false;
 	}
 
 	@Override

http://git-wip-us.apache.org/repos/asf/flink/blob/502ae585/flink-core/src/test/java/org/apache/flink/api/common/typeutils/base/array/StringArraySerializerTest.java
----------------------------------------------------------------------
diff --git a/flink-core/src/test/java/org/apache/flink/api/common/typeutils/base/array/StringArraySerializerTest.java
b/flink-core/src/test/java/org/apache/flink/api/common/typeutils/base/array/StringArraySerializerTest.java
index 6efe6f1..9780eda 100644
--- a/flink-core/src/test/java/org/apache/flink/api/common/typeutils/base/array/StringArraySerializerTest.java
+++ b/flink-core/src/test/java/org/apache/flink/api/common/typeutils/base/array/StringArraySerializerTest.java
@@ -24,6 +24,9 @@ import org.apache.flink.api.common.typeutils.SerializerTestBase;
 import org.apache.flink.api.common.typeutils.TypeSerializer;
 import org.apache.flink.api.common.typeutils.base.array.StringArraySerializer;
 import org.apache.flink.util.StringUtils;
+import org.junit.Test;
+
+import static org.junit.Assert.assertFalse;
 
 
 /**
@@ -70,4 +73,10 @@ public class StringArraySerializerTest extends SerializerTestBase<String[]>
{
 				null}
 		};
 	}
+
+	@Test
+	public void arrayTypeIsMutable() {
+		StringArraySerializer serializer = (StringArraySerializer) createSerializer();
+		assertFalse(serializer.isImmutableType());
+	}
 }


Mime
View raw message