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

 ##########
 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:
   Not sure if this check should be done here, I would assume its caller 
responsibility first check `isVarArg()` and then call `declareVarArgArray`.

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