hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jd...@apache.org
Subject [1/2] hive git commit: HIVE-8518: Compile time skew join optimization returns duplicated results (Rui via Xuefu) merged from trunk r1633422
Date Mon, 10 Aug 2015 22:40:20 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-1.0 f81a9b39d -> deb35763d


HIVE-8518: Compile time skew join optimization returns duplicated results (Rui via Xuefu)
merged from trunk r1633422

git-svn-id: https://svn.apache.org/repos/asf/hive/branches/spark@1633508 13f79535-47bb-0310-9956-ffa450edef68


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

Branch: refs/heads/branch-1.0
Commit: 846dd922060f488bf29367744ecc4bcfa6efa160
Parents: f81a9b3
Author: Jason Dere <jdere@hortonworks.com>
Authored: Mon Aug 10 15:31:23 2015 -0700
Committer: Jason Dere <jdere@hortonworks.com>
Committed: Mon Aug 10 15:31:23 2015 -0700

----------------------------------------------------------------------
 .../hadoop/hive/ql/optimizer/SkewJoinOptimizer.java     | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/846dd922/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SkewJoinOptimizer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SkewJoinOptimizer.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SkewJoinOptimizer.java
index 54afbfe..e87c41b 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SkewJoinOptimizer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SkewJoinOptimizer.java
@@ -171,15 +171,17 @@ public class SkewJoinOptimizer implements Transform {
         joinOpClone = (JoinOperator)currOpClone;
       }
 
+      List<TableScanOperator> tableScanCloneOpsForJoin =
+          new ArrayList<TableScanOperator>();
+      if (!getTableScanOpsForJoin(joinOpClone, tableScanCloneOpsForJoin)) {
+        LOG.debug("Operator tree not properly cloned!");
+        return null;
+      }
+
       // Put the filter "skewed column = skewed keys" in op
       // and "skewed columns != skewed keys" in selectOpClone
       insertSkewFilter(tableScanOpsForJoin, skewedValues, true);
 
-      List<TableScanOperator> tableScanCloneOpsForJoin =
-        new ArrayList<TableScanOperator>();
-      assert
-        getTableScanOpsForJoin(joinOpClone, tableScanCloneOpsForJoin);
-
       insertSkewFilter(tableScanCloneOpsForJoin, skewedValues, false);
 
       // Update the topOps appropriately


Mime
View raw message