zstan commented on code in PR #13544:
URL: https://github.com/apache/ignite/pull/13544#discussion_r3935285371


##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/IgniteSchema.java:
##########
@@ -94,23 +96,13 @@ public void removeTable(String tblName) {
      * @param func SQL function.
      */
     public void addFunction(String name, Function func) {
-        for (Function existingFun : getFunctions(name)) {
-            List<FunctionParameter> params = func.getParameters();
-            List<FunctionParameter> existingParams = 
existingFun.getParameters();
-
-            if (params.size() != existingParams.size())
-                continue;
-
-            for (int i = 0; i < params.size(); ++i) {
-                FunctionParameter p = params.get(i);
-                FunctionParameter existingP = existingParams.get(i);
+        IgniteTypeFactory typeFactory = Commons.typeFactory();
 
-                if 
(!p.getType(Commons.typeFactory()).equalsSansFieldNames(existingP.getType(Commons.typeFactory())))
-                    break;
+        for (Function existingFun : getFunctions(name)) {
+            if (sameParameters(func.getParameters(), 
existingFun.getParameters(), typeFactory)) {

Review Comment:
   If you will use non ignoring nullability comparison:
   ```
               if (!paramType.equalsSansFieldNames(existingParamType))
                   return false;
   ```
   Seems you can change behavior as it was in java and reduce further 
overloading missing errors



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

Reply via email to