Class FunctionInitializer

java.lang.Object
org.apache.drill.exec.expr.fn.FunctionInitializer

public class FunctionInitializer extends Object
To avoid the cost of initializing all functions up front, this class contains all information required to initializing a function when it is used.
  • Constructor Details

    • FunctionInitializer

      public FunctionInitializer(String className, ClassLoader classLoader)
      Parameters:
      className - the fully qualified name of the class implementing the function
      classLoader - class loader associated with the function, is unique for each jar that holds function to prevent classpath collisions during loading an unloading jars
  • Method Details

    • getClassLoader

      public ClassLoader getClassLoader()
      Returns:
      returns class loader
    • getClassName

      public String getClassName()
      Returns:
      the fully qualified name of the class implementing the function
    • getImports

      public List<String> getImports()
      Returns:
      the imports of this class (for java code gen)
    • getMethod

      public String getMethod(String methodName)
      Parameters:
      methodName - method name
      Returns:
      the content of the method (for java code gen inlining)