Github user jinfengni commented on a diff in the pull request:

    https://github.com/apache/drill/pull/792#discussion_r107808909
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/expr/EvaluationVisitor.java 
---
    @@ -671,8 +674,9 @@ private HoldingContainer 
visitBooleanAnd(BooleanOperator op,
           HoldingContainer out = generator.declare(op.getMajorType());
     
           JLabel label = generator.getEvalBlockLabel("AndOP");
    -      JBlock eval = generator.getEvalBlock().block();  // enter into 
nested block
    -      generator.nestEvalBlock(eval);
    +      JBlock eval = new JBlock();
    --- End diff --
    
    How about we add the following two methods in ClassGenerator.java: 
    
    ```java
      private JBlock createInnerBlock(BlockType type) {
        final JBlock currBlock = getBlock(type);
        final JBlock innerBlock = new JBlock();
        currBlock.add(innerBlock);
        return innerBlock;
      }
    
      protected JBlock createInnerEvalBlock() {
        return createInnerBlock(BlockType.EVAL);
      }
    ```
    
    Then, replace `generator.getEvalBlock().block()` with 
`generator.createInnerEvalBlock()`  ?



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