snuyanzin commented on code in PR #28733:
URL: https://github.com/apache/flink/pull/28733#discussion_r3571341085
##########
flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/LogicalTypeCastsTest.java:
##########
@@ -262,7 +263,29 @@ private static Stream<Arguments> testData() {
new RawType<>(Integer.class, IntSerializer.INSTANCE),
VarCharType.STRING_TYPE,
false,
- true));
+ true),
+
+ // variant to scalar is explicit only
+ Arguments.of(new VariantType(), new BooleanType(), false,
true),
+ Arguments.of(new VariantType(), new TinyIntType(), false,
true),
+ Arguments.of(new VariantType(), new IntType(), false, true),
+ Arguments.of(new VariantType(), new BigIntType(), false, true),
+ Arguments.of(new VariantType(), new DoubleType(), false, true),
+ Arguments.of(new VariantType(), new DecimalType(10, 2), false,
true),
+ Arguments.of(new VariantType(), new DateType(), false, true),
+ Arguments.of(new VariantType(), new TimestampType(), false,
true),
+ Arguments.of(new VariantType(), new LocalZonedTimestampType(),
false, true),
+ Arguments.of(
+ new VariantType(),
+ new VarBinaryType(VarBinaryType.MAX_LENGTH),
+ false,
+ true),
+ // variant identity cast is implicit
+ Arguments.of(new VariantType(), new VariantType(), true, true),
+ // TIME, character strings and constructed targets are not
castable from variant
+ Arguments.of(new VariantType(), new TimeType(), false, false),
+ Arguments.of(new VariantType(), VarCharType.STRING_TYPE,
false, false),
+ Arguments.of(new VariantType(), new ArrayType(new IntType()),
false, false));
Review Comment:
map, row?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]