drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ar...@apache.org
Subject [3/5] drill git commit: DRILL-5665: Add the option planner.force_2phase_aggr to override small inputs
Date Fri, 21 Jul 2017 17:23:39 GMT
DRILL-5665: Add the option planner.force_2phase_aggr to override small inputs

closes #872


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/943a1432
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/943a1432
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/943a1432

Branch: refs/heads/master
Commit: 943a1432943c5aff0db76b8eb2d6cf9273737b6f
Parents: 6b0e837
Author: Boaz Ben-Zvi <boazben-zvi@BBenZvi-E754-MBP13.local>
Authored: Tue Jul 18 15:18:08 2017 -0700
Committer: Arina Ielchiieva <arina.yelchiyeva@gmail.com>
Committed: Fri Jul 21 16:32:42 2017 +0300

----------------------------------------------------------------------
 .../org/apache/drill/exec/planner/physical/AggPruleBase.java  | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/943a1432/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/AggPruleBase.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/AggPruleBase.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/AggPruleBase.java
index 460ee8a..3de5fca 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/AggPruleBase.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/AggPruleBase.java
@@ -61,12 +61,11 @@ public abstract class AggPruleBase extends Prule {
   // 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();
-    if (! settings.isMultiPhaseAggEnabled() || settings.isSingleMode() || smallInput) {
+    if (! settings.isMultiPhaseAggEnabled() || settings.isSingleMode() ||
+        // Can override a small child - e.g., for testing with a small table
+        ( smallInput && ! settings.isForce2phaseAggr() ) ) {
       return false;
     }
 


Mime
View raw message