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

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

Github user Ben-Zvi commented on a diff in the pull request:

    https://github.com/apache/drill/pull/872#discussion_r128082476
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/AggPruleBase.java
 ---
    @@ -61,11 +61,9 @@ protected AggPruleBase(RelOptRuleOperand operand, String 
description) {
       // currently won't generate a 2 phase plan.
       protected boolean create2PhasePlan(RelOptRuleCall call, 
DrillAggregateRel aggregate) {
         PlannerSettings settings = 
PrelUtil.getPlannerSettings(call.getPlanner());
    -    if ( settings.isForce2phaseAggr() ) { // for testing - force 2 phase 
aggr
    -      return true;
    -    }
         RelNode child = call.rel(0).getInputs().get(0);
    -    boolean smallInput = child.getRows() < settings.getSliceTarget();
    +    boolean smallInput = child.getRows() < settings.getSliceTarget() &&
    --- End diff --
    
    Done


> planner.force_2phase.aggr Set to TRUE for HashAgg may cause wrong results for 
> VARIANCE and STD_DEV
> --------------------------------------------------------------------------------------------------
>
>                 Key: DRILL-5665
>                 URL: https://issues.apache.org/jira/browse/DRILL-5665
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Relational Operators
>    Affects Versions: 1.11.0
>            Reporter: Boaz Ben-Zvi
>            Assignee: Boaz Ben-Zvi
>             Fix For: 1.11.0
>
>
> *planner.force_2phase.aggr* was added for testing the hash 2-phase spill to 
> disk aggregation implementation. However, if it is set to true, stream 
> aggregate will run in two phase too and return wrong results for some 
> functions such as variance() and std_dev().



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

Reply via email to