hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jd...@apache.org
Subject [42/50] [abbrv] hive git commit: HIVE-12165: wrong result when hive.optimize.sampling.orderby=true with some aggregate functions (Aihua Xu, reviewed by Yongzhi Chen)
Date Tue, 23 Feb 2016 19:17:41 GMT
HIVE-12165: wrong result when hive.optimize.sampling.orderby=true with some aggregate functions
(Aihua Xu, reviewed by Yongzhi Chen)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/305c2f6e
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/305c2f6e
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/305c2f6e

Branch: refs/heads/llap
Commit: 305c2f6ef0eb552d43a4f6c3bcb0e0284be78529
Parents: 5421c22
Author: Aihua Xu <aihuaxu@apache.org>
Authored: Wed Feb 17 17:24:03 2016 -0500
Committer: Aihua Xu <aihuaxu@apache.org>
Committed: Mon Feb 22 10:19:13 2016 -0500

----------------------------------------------------------------------
 .../hadoop/hive/ql/optimizer/physical/SamplingOptimizer.java    | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/305c2f6e/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/SamplingOptimizer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/SamplingOptimizer.java
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/SamplingOptimizer.java
index 2e1d15c..2def168 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/SamplingOptimizer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/SamplingOptimizer.java
@@ -20,6 +20,7 @@
 
 package org.apache.hadoop.hive.ql.optimizer.physical;
 
+import org.apache.hadoop.hive.ql.exec.GroupByOperator;
 import org.apache.hadoop.hive.ql.exec.Operator;
 import org.apache.hadoop.hive.ql.exec.OperatorUtils;
 import org.apache.hadoop.hive.ql.exec.ReduceSinkOperator;
@@ -50,6 +51,10 @@ public class SamplingOptimizer implements PhysicalPlanResolver {
           || reduceWork.getReducer() == null) {
         continue;
       }
+      // GROUPBY operator in reducer may not be processed in parallel. Skip optimizing.
+      if (OperatorUtils.findSingleOperator(reduceWork.getReducer(), GroupByOperator.class)
!= null) {
+        continue;
+      }
       Operator<?> operator = mapWork.getAliasToWork().values().iterator().next();
       if (!(operator instanceof TableScanOperator)) {
         continue;


Mime
View raw message