[ 
https://issues.apache.org/jira/browse/DRILL-5546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16148008#comment-16148008
 ] 

ASF GitHub Bot commented on DRILL-5546:
---------------------------------------

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. 


> Schema change problems caused by empty batch
> --------------------------------------------
>
>                 Key: DRILL-5546
>                 URL: https://issues.apache.org/jira/browse/DRILL-5546
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Jinfeng Ni
>            Assignee: Jinfeng Ni
>
> There have been a few JIRAs opened related to schema change failure caused by 
> empty batch. This JIRA is opened as an umbrella for all those related JIRAS ( 
> such as DRILL-4686, DRILL-4734, DRILL4476, DRILL-4255, etc).
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to