twalthr commented on a change in pull request #18524:
URL: https://github.com/apache/flink/pull/18524#discussion_r811070990
##########
File path:
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/logical/utils/LogicalTypeCasts.java
##########
@@ -318,11 +318,17 @@ private static boolean supportsCasting(
// cast between interval and exact numeric is only supported if
interval has a single
// field
return isSingleFieldInterval(targetType);
+ } else if ((sourceType.is(CONSTRUCTED) ||
sourceType.is(STRUCTURED_TYPE))
+ && targetType.is(CHARACTER_STRING)) {
+ return supportsCollectionAndStructuredToStringCasting(sourceType,
allowExplicit);
Review comment:
if we would introduce new types, we need to check all utilities anyway.
it is pretty obvious that a `toString` will be supported by those as well. I
would suggest to keep the code simple.
--
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]