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

    https://github.com/apache/drill/pull/872#discussion_r128026173
  
    --- 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 --
    
    Overloading smallInput makes it confusing.  Why not modify the if condition 
below to : 
        (... || (smallInput && !settings.isForce2phaseAggr()) 
    This way the meaning of smallInput is not changed. 


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