Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/660#discussion_r91641555
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/expr/CodeGenerator.java ---
    @@ -67,26 +96,71 @@
         try {
           this.model = new JCodeModel();
           JDefinedClass clazz = model._package(PACKAGE_NAME)._class(className);
    +      if ( isPlainOldJava( ) ) {
    +        clazz._extends(definition.getTemplateClass( ) );
    +      }
           rootGenerator = new ClassGenerator<>(this, mappingSet, 
definition.getSignature(), new EvaluationVisitor(
               funcRegistry), clazz, model, optionManager);
         } catch (JClassAlreadyExistsException e) {
           throw new IllegalStateException(e);
         }
       }
     
    +  /**
    +   * Indicates that the code for this class can be generated using the
    +   * "Plain Old Java" mechanism based on inheritance. The byte-code
    +   * method is more lenient, so some code is missing some features such
    +   * as proper exception labeling, etc. Set this option to true once
    +   * the generation mechanism for a class has been cleaned up to work
    +   * via the plain-old Java mechanism.
    +   *
    +   * @param flag true if the code generated from this instance is
    +   * ready to be compiled as a plain-old Java class
    +   */
    +
    +  public void plainOldJavaCapable(boolean flag) {
    +    plainOldJavaCapable = flag;
    +  }
    +
    +  /**
    +   * Identifies that this generated class should be generated via the
    +   * plain-old Java mechanism. This flag only has meaning if the
    +   * generated class is capable of plain-old Java generation.
    +   *
    +   * @param flag true if the class should be generated and compiled
    +   * as a plain-old Java class (rather than via byte-code manipulations)
    +   */
    +
    +  public void preferPlainOJava(boolean flag) {
    +    usePlainOldJava = flag;
    --- End diff --
    
    Yeah... typo. Fixed.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to