davidradl commented on code in PR #28733:
URL: https://github.com/apache/flink/pull/28733#discussion_r3570748878
##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/logical/utils/LogicalTypeCasts.java:
##########
@@ -726,6 +730,31 @@ private static boolean supportsConstructedCasting(
return false;
}
+ private static boolean supportsVariantToScalarCast(LogicalType targetType)
{
+ switch (targetType.getTypeRoot()) {
+ case BOOLEAN:
+ case TINYINT:
+ case SMALLINT:
+ case INTEGER:
+ case BIGINT:
+ case FLOAT:
+ case DOUBLE:
+ case DECIMAL:
+ case BINARY:
+ case VARBINARY:
+ case DATE:
+ case TIMESTAMP_WITHOUT_TIME_ZONE:
+ case TIMESTAMP_WITH_LOCAL_TIME_ZONE:
+ return true;
+ default:
+ // TIME has no counterpart in the Variant type model.
CHARACTER_STRING is handled by
Review Comment:
I wonder if the cast is to a string then we could issue a helpful exception
message indicating which SQL functions the user should use.
--
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]