vvysotskyi commented on a change in pull request #1835: DRILL-7337: Add vararg 
UDFs support
URL: https://github.com/apache/drill/pull/1835#discussion_r310392996
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/DrillFuncHolder.java
 ##########
 @@ -262,6 +260,78 @@ protected void addProtectedBlock(ClassGenerator<?> g, 
JBlock sub, String body, H
     }
   }
 
+  /**
+   * Checks whether current function is var arg one and declares array for 
storing vararg function arguments.
+   *
+   * @param model          code model to generate the code
+   * @param jBlock         block of code to be populated
+   * @param inputVariables array of input variables for current function
+   */
+  protected void declareVarArgArray(JCodeModel model, JBlock jBlock, 
HoldingContainer[] inputVariables) {
+    if (isVarArg()) {
 
 Review comment:
   Agree with you, thanks for pointing this, moved `isVarArg()` check outside 
of the method.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to