You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/04/11 15:25:30 UTC

[GitHub] [flink] slinkydeveloper commented on a diff in pull request #19426: [FLINK-25928] Throw validation error early for CAST

slinkydeveloper commented on code in PR #19426:
URL: https://github.com/apache/flink/pull/19426#discussion_r847453122


##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/logical/utils/LogicalTypeCasts.java:
##########
@@ -589,6 +591,37 @@ protected Boolean defaultMethod(LogicalType targetType) {
         }
     }
 
+    /**
+     * Check if the source/target pair is not allowed and throw a {@link ValidationException} with a
+     * useful error message.
+     */

Review Comment:
   This javadoc is not true, as if the source target pair is not allowed in all other cases except numeric to timestamp, this function won't fail.
   
   In general I don't like much the fact that we have both `validate` and `supportsExplicitCast`, is there a better way to solve this?



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org