snuyanzin commented on code in PR #23520: URL: https://github.com/apache/flink/pull/23520#discussion_r1359230362
########## flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java: ########## @@ -1948,9 +1951,23 @@ public CalciteException handleUnresolvedFunction( if (unresolvedFunction instanceof SqlFunction) { final SqlOperandTypeChecker typeChecking = new AssignableOperandTypeChecker(argTypes, argNames); - signature = + final String invocation = typeChecking.getAllowedSignatures( unresolvedFunction, unresolvedFunction.getName()); + if (unresolvedFunction.getOperandTypeChecker() != null) { + final String allowedSignatures = + unresolvedFunction + .getOperandTypeChecker() + .getAllowedSignatures( + unresolvedFunction, unresolvedFunction.getName()); + throw newValidationError( + call, + EXTRA_RESOURCE.validatorNoFunctionMatch(invocation, allowedSignatures)); + } else { + signature = + typeChecking.getAllowedSignatures( + unresolvedFunction, unresolvedFunction.getName()); + } Review Comment: This class is copied from Apache Calcite to work around some issues mentioned in comments at the beginning of class declaration. It is better to keep it as is to simplify future upgrades or each change (which is not done in corresponding Calcite's version should be highlighted with comments like done for others) -- 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