You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tw...@apache.org on 2019/06/05 06:10:25 UTC
[flink] branch master updated (38557bf -> 5f5f02b)
This is an automated email from the ASF dual-hosted git repository.
twalthr pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git.
from 38557bf [FLINK-12572][hive]Implement HiveInputFormat to read Hive tables
new d119582 [hotfix][core] Add notice about TypeSerializerSnapshot serialization
new 5f5f02b [FLINK-12726][table-common] Fix ANY type serialization
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../api/common/typeutils/TypeSerializerSnapshot.java | 6 +++++-
.../apache/flink/table/types/logical/AnyType.java | 4 ++--
.../apache/flink/table/types/LogicalTypesTest.java | 20 +++++++++++---------
3 files changed, 18 insertions(+), 12 deletions(-)
[flink] 01/02: [hotfix][core] Add notice about
TypeSerializerSnapshot serialization
Posted by tw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
twalthr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
commit d11958281ea785b6b5fcc32a169ed4b96dcecd87
Author: Timo Walther <tw...@apache.org>
AuthorDate: Tue Jun 4 11:33:41 2019 +0200
[hotfix][core] Add notice about TypeSerializerSnapshot serialization
---
.../apache/flink/api/common/typeutils/TypeSerializerSnapshot.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/flink-core/src/main/java/org/apache/flink/api/common/typeutils/TypeSerializerSnapshot.java b/flink-core/src/main/java/org/apache/flink/api/common/typeutils/TypeSerializerSnapshot.java
index 20fcbb7..0dff5b2 100644
--- a/flink-core/src/main/java/org/apache/flink/api/common/typeutils/TypeSerializerSnapshot.java
+++ b/flink-core/src/main/java/org/apache/flink/api/common/typeutils/TypeSerializerSnapshot.java
@@ -89,6 +89,8 @@ public interface TypeSerializerSnapshot<T> {
* @param out the {@link DataOutputView} to write the snapshot to.
*
* @throws IOException Thrown if the snapshot data could not be written.
+ *
+ * @see #writeVersionedSnapshot(DataOutputView, TypeSerializerSnapshot)
*/
void writeSnapshot(DataOutputView out) throws IOException;
@@ -102,7 +104,9 @@ public interface TypeSerializerSnapshot<T> {
* @param in the {@link DataInputView} to read the snapshot from.
* @param userCodeClassLoader the user code classloader
*
- * * @throws IOException Thrown if the snapshot data could be read or parsed.
+ * @throws IOException Thrown if the snapshot data could be read or parsed.
+ *
+ * @see #readVersionedSnapshot(DataInputView, ClassLoader)
*/
void readSnapshot(int readVersion, DataInputView in, ClassLoader userCodeClassLoader) throws IOException;
[flink] 02/02: [FLINK-12726][table-common] Fix ANY type
serialization
Posted by tw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
twalthr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 5f5f02b1272ceba5e72ac8bb29e3d260d66bd493
Author: Timo Walther <tw...@apache.org>
AuthorDate: Tue Jun 4 11:47:32 2019 +0200
[FLINK-12726][table-common] Fix ANY type serialization
This closes #8612.
---
.../apache/flink/table/types/logical/AnyType.java | 4 ++--
.../apache/flink/table/types/LogicalTypesTest.java | 20 +++++++++++---------
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/logical/AnyType.java b/flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/logical/AnyType.java
index 4f17539..ba849ca 100644
--- a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/logical/AnyType.java
+++ b/flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/logical/AnyType.java
@@ -141,7 +141,7 @@ public final class AnyType<T> extends LogicalType {
if (serializerString == null) {
final DataOutputSerializer outputSerializer = new DataOutputSerializer(128);
try {
- serializer.snapshotConfiguration().writeSnapshot(outputSerializer);
+ TypeSerializerSnapshot.writeVersionedSnapshot(outputSerializer, serializer.snapshotConfiguration());
serializerString = EncodingUtils.encodeBytesToBase64(outputSerializer.getCopyOfBuffer());
return serializerString;
} catch (Exception e) {
@@ -149,7 +149,7 @@ public final class AnyType<T> extends LogicalType {
"Unable to generate a string representation of the serializer snapshot of '%s' " +
"describing the class '%s' for the ANY type.",
serializer.getClass().getName(),
- clazz.toString()));
+ clazz.toString()), e);
}
}
return serializerString;
diff --git a/flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/LogicalTypesTest.java b/flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/LogicalTypesTest.java
index 600b718..100982a 100644
--- a/flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/LogicalTypesTest.java
+++ b/flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/LogicalTypesTest.java
@@ -568,15 +568,17 @@ public class LogicalTypesTest {
testAll(
new AnyType<>(Human.class, new KryoSerializer<>(Human.class, new ExecutionConfig())),
"ANY(org.apache.flink.table.types.LogicalTypesTest$Human, " +
- "ADNvcmcuYXBhY2hlLmZsaW5rLnRhYmxlLnR5cGVzLkxvZ2ljYWxUeXBlc1Rlc3QkSHVtYW4AAATyxpo9cAA" +
- "AAAIAM29yZy5hcGFjaGUuZmxpbmsudGFibGUudHlwZXMuTG9naWNhbFR5cGVzVGVzdCRIdW1hbgEAAAA1AD" +
- "NvcmcuYXBhY2hlLmZsaW5rLnRhYmxlLnR5cGVzLkxvZ2ljYWxUeXBlc1Rlc3QkSHVtYW4BAAAAOQAzb3JnL" +
- "mFwYWNoZS5mbGluay50YWJsZS50eXBlcy5Mb2dpY2FsVHlwZXNUZXN0JEh1bWFuAAAAAAApb3JnLmFwYWNo" +
- "ZS5hdnJvLmdlbmVyaWMuR2VuZXJpY0RhdGEkQXJyYXkBAAAAKwApb3JnLmFwYWNoZS5hdnJvLmdlbmVyaWM" +
- "uR2VuZXJpY0RhdGEkQXJyYXkBAAAAtgBVb3JnLmFwYWNoZS5mbGluay5hcGkuamF2YS50eXBldXRpbHMucn" +
- "VudGltZS5rcnlvLlNlcmlhbGl6ZXJzJER1bW15QXZyb1JlZ2lzdGVyZWRDbGFzc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.apache.flink.table.types.LogicalTypesTest$Human, ...)",
new Class[]{Human.class, User.class}, // every User is Human
new Class[]{Human.class},