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_r310384138
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/FunctionConverter.java
 ##########
 @@ -93,18 +96,30 @@
       // TODO(Julien): verify there are a few of those and we can load them
       Class<?> fieldClass = field.getFieldClass();
       if (param != null || output != null) {
+        if (Object[].class.isAssignableFrom(fieldClass)) {
+          fieldClass = fieldClass.getComponentType();
+          varArgsCount++;
+        } else if (varArgsCount > 0 && param != null) {
+          return failure("Vararg should be the last argument of function.", 
func, field);
 
 Review comment:
   ```suggestion
             return failure("Vararg should be the last argument in the 
function.", func, field);
   ```

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