dawidwys commented on a change in pull request #8335:
[FLINK-12253][table-common] Setup a class hierarchy for the new logical type
system
URL: https://github.com/apache/flink/pull/8335#discussion_r280764585
##########
File path:
flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/LogicalTypesTest.java
##########
@@ -412,6 +419,40 @@ public void testNullType() {
assertFalse(nullType.supportsOutputConversion(int.class));
}
+ @Test
+ public void testTypeInformationAnyType() {
+ final TypeInformationAnyType<?> anyType = new
TypeInformationAnyType<>(Types.TUPLE(Types.STRING, Types.INT));
+
+ testEquality(anyType, new
TypeInformationAnyType<>(Types.TUPLE(Types.STRING, Types.LONG)));
+
+ testNullability(anyType);
+
+ testJavaSerializability(anyType);
+
+ testConversions(anyType, new Class[]{Tuple2.class}, new
Class[]{Tuple.class});
+ }
+
+ @Test
+ public void testAnyType() {
+ testAll(
+ new AnyType<>(Human.class, new
KryoSerializer<>(Human.class, new ExecutionConfig())),
+
"ANY(org.apache.flink.table.types.LogicalTypesTest$Human, " +
+
"ADNvcmcuYXBhY2hlLmZsaW5rLnRhYmxlLnR5cGVzLkxvZ2ljYWxUeXBlc1Rlc3QkSHVtYW4AAATyxpo9cAA"
+
Review comment:
Could we not hardcode the snapshot? Changes to the KryoSerializer will break
this test.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services