FAQ
Repository: hive
Updated Branches:
   refs/heads/master 5421c2288 -> 305c2f6ef


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/master
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;

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupcommits @
categorieshive, hadoop
postedFeb 22, '16 at 3:28p
activeFeb 22, '16 at 3:28p
posts1
users1
websitehive.apache.org

1 user in discussion

Aihuaxu: 1 post

People

Translate

site design / logo © 2021 Grokbase