hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject svn commit: r1433997 - in /hive/trunk/ql/src: java/org/apache/hadoop/hive/ql/ErrorMsg.java java/org/apache/hadoop/hive/ql/optimizer/MapJoinProcessor.java test/queries/clientnegative/invalid_mapjoin1.q test/results/clientnegative/invalid_mapjoin1.q.out
Date Wed, 16 Jan 2013 15:48:20 GMT
Author: namit
Date: Wed Jan 16 15:48:20 2013
New Revision: 1433997

URL: http://svn.apache.org/viewvc?rev=1433997&view=rev
Log:
HIVE-3872 MAP JOIN for VIEW thorws NULL pointer exception error
(Navis via namit)


Added:
    hive/trunk/ql/src/test/queries/clientnegative/invalid_mapjoin1.q
    hive/trunk/ql/src/test/results/clientnegative/invalid_mapjoin1.q.out
Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/MapJoinProcessor.java

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java?rev=1433997&r1=1433996&r2=1433997&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java Wed Jan 16 15:48:20 2013
@@ -113,7 +113,7 @@ public enum ErrorMsg {
   NO_VALID_PARTN(10056, "The query does not reference any valid partition. "
       + "To run this query, set hive.mapred.mode=nonstrict"),
   NO_OUTER_MAPJOIN(10057, "MAPJOIN cannot be performed with OUTER JOIN"),
-  INVALID_MAPJOIN_HINT(10058, "Neither table specified as map-table"),
+  INVALID_MAPJOIN_HINT(10058, "All tables are specified as map-table for join"),
   INVALID_MAPJOIN_TABLE(10059, "Result of a union cannot be a map table"),
   NON_BUCKETED_TABLE(10060, "Sampling expression needed for non-bucketed table"),
   BUCKETED_NUMERATOR_BIGGER_DENOMINATOR(10061, "Numerator should not be bigger than "

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/MapJoinProcessor.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/MapJoinProcessor.java?rev=1433997&r1=1433996&r2=1433997&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/MapJoinProcessor.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/MapJoinProcessor.java Wed Jan
16 15:48:20 2013
@@ -19,6 +19,7 @@
 package org.apache.hadoop.hive.ql.optimizer;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -660,8 +661,8 @@ public class MapJoinProcessor implements
       // support this by randomly
       // leaving some table from the list of tables to be cached
       if (mapJoinPos == -1) {
-        throw new SemanticException(ErrorMsg.INVALID_MAPJOIN_HINT.getMsg(pGraphContext.getQB()
-            .getParseInfo().getHints()));
+        throw new SemanticException(ErrorMsg.INVALID_MAPJOIN_HINT.getMsg(
+            Arrays.toString(joinTree.getBaseSrc())));
       }
     }
 

Added: hive/trunk/ql/src/test/queries/clientnegative/invalid_mapjoin1.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientnegative/invalid_mapjoin1.q?rev=1433997&view=auto
==============================================================================
--- hive/trunk/ql/src/test/queries/clientnegative/invalid_mapjoin1.q (added)
+++ hive/trunk/ql/src/test/queries/clientnegative/invalid_mapjoin1.q Wed Jan 16 15:48:20 2013
@@ -0,0 +1 @@
+select /*+ MAPJOIN(a) ,MAPJOIN(b)*/ * from src a join src b on (a.key=b.key and a.value=b.value);

Added: hive/trunk/ql/src/test/results/clientnegative/invalid_mapjoin1.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/invalid_mapjoin1.q.out?rev=1433997&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/invalid_mapjoin1.q.out (added)
+++ hive/trunk/ql/src/test/results/clientnegative/invalid_mapjoin1.q.out Wed Jan 16 15:48:20
2013
@@ -0,0 +1 @@
+FAILED: SemanticException [Error 10058]: All tables are specified as map-table for join [a,
b]



Mime
View raw message