bvarghese1 commented on code in PR #23520:
URL: https://github.com/apache/flink/pull/23520#discussion_r1369044944


##########
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:
   Created Calcite Ticket - https://issues.apache.org/jira/browse/CALCITE-6069



-- 
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

Reply via email to