xuzifu666 commented on code in PR #5340:
URL: https://github.com/apache/calcite/pull/5340#discussion_r4325447581


##########
core/src/main/java/org/apache/calcite/sql/SqlUtil.java:
##########
@@ -766,6 +767,30 @@ private static Iterator<SqlOperator> 
filterRoutinesByParameterTypeAndName(
     });
   }
 
+  /** Looks up a parameter name in a list of formal parameter names,
+   * case-insensitively.
+   *
+   * <p>Argument names from the parser are subject to unquoted casing (for
+   * example, {@code x => 1} becomes {@code X => 1}), while formal parameter
+   * names declared via {@link org.apache.calcite.linq4j.function.Parameter}
+   * annotations or reflection retain their case. Parameter names must
+   * therefore always be matched case-insensitively, consistent with
+   * {@link SqlCallBinding#operands()}.
+   *
+   * @param paramNames list of formal parameter names
+   * @param argName argument name to look up
+   * @return index of the first matching parameter, or -1 if not found
+   */
+  public static int lookupParamName(List<String> paramNames, String argName) {

Review Comment:
   Done, renamed to lookupParamNameCaseInsensitive.



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