drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinfengni <...@git.apache.org>
Subject [GitHub] drill pull request #792: DRILL-4971: query encounters system error: Statemen...
Date Thu, 23 Mar 2017 23:38:36 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message