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

    https://github.com/apache/drill/pull/906#discussion_r136182353
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/ProjectPrel.java
 ---
    @@ -35,18 +35,43 @@
     import org.apache.calcite.rex.RexNode;
     import org.apache.calcite.sql.SqlKind;
     
    +/**
    + * A physical Prel node for Project operator.
    + */
     public class ProjectPrel extends DrillProjectRelBase implements Prel{
       static final org.slf4j.Logger logger = 
org.slf4j.LoggerFactory.getLogger(ProjectPrel.class);
     
    +  private final boolean outputProj;
     
       public ProjectPrel(RelOptCluster cluster, RelTraitSet traits, RelNode 
child, List<RexNode> exps,
           RelDataType rowType) {
    +    this(cluster, traits, child, exps, rowType, false);
    +  }
    +
    +  /**
    +   * Constructor for ProjectPrel.
    +   * @param cluster
    +   * @param traits traits of ProjectPrel node
    +   * @param child  input
    +   * @param exps   list of RexNode, representing expressions of projection.
    +   * @param rowType output rowType of projection expression.
    +   * @param outputProj true if ProjectPrel is inserted by {@link 
org.apache.drill.exec.planner.physical.visitor.TopProjectVisitor}
    +   *                   Such top Project operator does the following 
processing, before the result was presented to Screen/Writer
    +   *                   1) ensure final output field names are preserved,
    +   *                   2) handle cases where input does not return any 
batch (a fast NONE) (see ProjectRecordBatch.handleFastNone() method)
    +   *                   3) handle cases where expressions in upstream 
operator were evaluated to NULL type
    --- End diff --
    
    Done. 


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