hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vik...@apache.org
Subject svn commit: r1652532 - in /hive/trunk: itests/src/test/resources/testconfiguration.properties ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConvertJoinMapJoin.java
Date Fri, 16 Jan 2015 22:23:41 GMT
Author: vikram
Date: Fri Jan 16 22:23:41 2015
New Revision: 1652532

URL: http://svn.apache.org/r1652532
Log:
HIVE-9038: Join tests fail on Tez (Vikram Dixit K, reviewed by Sergey Shelukhin)

Modified:
    hive/trunk/itests/src/test/resources/testconfiguration.properties
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConvertJoinMapJoin.java

Modified: hive/trunk/itests/src/test/resources/testconfiguration.properties
URL: http://svn.apache.org/viewvc/hive/trunk/itests/src/test/resources/testconfiguration.properties?rev=1652532&r1=1652531&r2=1652532&view=diff
==============================================================================
--- hive/trunk/itests/src/test/resources/testconfiguration.properties (original)
+++ hive/trunk/itests/src/test/resources/testconfiguration.properties Fri Jan 16 22:23:41
2015
@@ -271,7 +271,11 @@ minitez.query.files.shared=alter_merge_2
   auto_sortmerge_join_5.q,\
   auto_sortmerge_join_7.q,\
   auto_sortmerge_join_8.q,\
-  auto_sortmerge_join_9.q
+  auto_sortmerge_join_9.q,\
+  auto_join30.q,\
+  auto_join21.q,\
+  auto_join29.q,\
+  auto_join_filters.q
 
 
 minitez.query.files=bucket_map_join_tez1.q,\

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConvertJoinMapJoin.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConvertJoinMapJoin.java?rev=1652532&r1=1652531&r2=1652532&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConvertJoinMapJoin.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConvertJoinMapJoin.java Fri
Jan 16 22:23:41 2015
@@ -504,7 +504,38 @@ public class ConvertJoinMapJoin implemen
   }
 
   public int getMapJoinConversionPos(JoinOperator joinOp, OptimizeTezProcContext context,
-      int buckets) {
+      int buckets) throws SemanticException {
+    /*
+     * HIVE-9038: Join tests fail in tez when we have more than 1 join on the same key and
there is
+     * an outer join down the join tree that requires filterTag. We disable this conversion
to map
+     * join here now. We need to emulate the behavior of HashTableSinkOperator as in MR or
create a
+     * new operation to be able to support this. This seems like a corner case enough to
special
+     * case this for now.
+     */
+    if (joinOp.getConf().getConds().length > 1) {
+      boolean hasOuter = false;
+      for (JoinCondDesc joinCondDesc : joinOp.getConf().getConds()) {
+        switch (joinCondDesc.getType()) {
+        case JoinDesc.INNER_JOIN:
+        case JoinDesc.LEFT_SEMI_JOIN:
+        case JoinDesc.UNIQUE_JOIN:
+          hasOuter = false;
+          break;
+
+        case JoinDesc.FULL_OUTER_JOIN:
+        case JoinDesc.LEFT_OUTER_JOIN:
+        case JoinDesc.RIGHT_OUTER_JOIN:
+          hasOuter = true;
+          break;
+
+        default:
+          throw new SemanticException("Unknown join type " + joinCondDesc.getType());
+        }
+      }
+      if (hasOuter) {
+        return -1;
+      }
+    }
     Set<Integer> bigTableCandidateSet =
         MapJoinProcessor.getBigTableCandidates(joinOp.getConf().getConds());
 



Mime
View raw message