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-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org