clintropolis commented on code in PR #12995:
URL: https://github.com/apache/druid/pull/12995#discussion_r960106724


##########
core/src/main/java/org/apache/druid/math/expr/ApplyFunction.java:
##########
@@ -105,6 +103,44 @@ default boolean hasArrayOutput(LambdaExpr lambdaExpr)
    */
   void validateArguments(LambdaExpr lambdaExpr, List<Expr> args);
 
+  /**
+   * Check that the argument list is the expected size. The list of arguments 
should not include the
+   * {@link LambdaExpr} and so the error message will indicate that count + 1 
arguments are required.
+   */
+  default void validateArgumentCount(LambdaExpr lambdaExpr, List<Expr> args, 
int count)

Review Comment:
   These are helper methods to help things implement `validateArguments`. I 
went with this to cut down on the number of arguments that callers need to pass 
to them. To try to clarify the role of these methods, I have renamed them to 
things like `validationHelperCheckArgumentCount` and added additional javadocs



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to