Github user arina-ielchiieva commented on a diff in the pull request:

    https://github.com/apache/drill/pull/843#discussion_r118186352
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/ImportGrabber.java 
---
    @@ -63,9 +62,21 @@ public void 
traverseStaticImportOnDemandDeclaration(StaticImportOnDemandDeclarat
     
       }
     
    -  public static List<String> getMethods(Java.CompilationUnit cu){
    -    ImportGrabber visitor = new ImportGrabber();
    -    
cu.getPackageMemberTypeDeclarations()[0].accept(visitor.finder.comprehensiveVisitor());
    +  /**
    +   * Creates list of imports that are present in compilation unit.
    +   * For example:
    +   * [import io.netty.buffer.DrillBuf;, import 
org.apache.drill.exec.expr.DrillSimpleFunc;]
    +   *
    +   * @param compilationUnit compilation unit
    +   * @return list of imports
    +   */
    +  public static List<String> getImports(Java.CompilationUnit 
compilationUnit){
    --- End diff --
    
    When writing code for UDFs, we recommend users to use the fully qualified 
class names instead of imports.
    What if we enhance our UDFs generation code to use imports from function 
class? This way, fully qualified class names usage won't be required. Since I 
thought it could be used for future enhancement, I have left `ImportGrabber`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to