hadoop-hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhr...@apache.org
Subject svn commit: r734487 - in /hadoop/hive/trunk: CHANGES.txt ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java ql/src/test/queries/clientpositive/insert1.q ql/src/test/results/clientpositive/insert1.q.out
Date Wed, 14 Jan 2009 19:24:43 GMT
Author: dhruba
Date: Wed Jan 14 11:24:43 2009
New Revision: 734487

URL: http://svn.apache.org/viewvc?rev=734487&view=rev
Log:
HIVE-230.  Fix for a Null Pointer Exception that occured while loading a 
table from a query that returns empty data.  (Prasad Chakka via dhruba)


Added:
    hadoop/hive/trunk/ql/src/test/queries/clientpositive/insert1.q
    hadoop/hive/trunk/ql/src/test/results/clientpositive/insert1.q.out
Modified:
    hadoop/hive/trunk/CHANGES.txt
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java

Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=734487&r1=734486&r2=734487&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Wed Jan 14 11:24:43 2009
@@ -199,3 +199,6 @@
 
     HIVE-220. Incorrect log directory in TestMTQueries causing null pointer
     exception.  (Prasad Chakka via dhruba)
+
+    HIVE-230.  Fix for a Null Pointer Exception that occured while loading a 
+    table from a query that returns empty data.  (Prasad Chakka via dhruba)

Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java?rev=734487&r1=734486&r2=734487&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java (original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java Wed Jan 14
11:24:43 2009
@@ -124,7 +124,7 @@
               Hive.get().getConf());
           dirs = fs.globStatus(new Path(tbd.getSourceDir()));
           files = new ArrayList<FileStatus>();
-          for (int i=0; i<dirs.length; i++) {
+          for (int i=0; (dirs != null && i<dirs.length); i++) {
             files.addAll(Arrays.asList(fs.listStatus(dirs[i].getPath())));
             // We only check one file, so exit the loop when we have at least one.
             if (files.size()>0) break;

Added: hadoop/hive/trunk/ql/src/test/queries/clientpositive/insert1.q
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/queries/clientpositive/insert1.q?rev=734487&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/test/queries/clientpositive/insert1.q (added)
+++ hadoop/hive/trunk/ql/src/test/queries/clientpositive/insert1.q Wed Jan 14 11:24:43 2009
@@ -0,0 +1,7 @@
+drop table insert1;
+drop table insert2;
+create table insert1(key int, value string) stored as textfile;
+create table insert2(key int, value string) stored as textfile;
+insert overwrite table insert1 select a.key, a.value from insert2 a WHERE (a.key=-1);
+drop table insert1;
+drop table insert2;

Added: hadoop/hive/trunk/ql/src/test/results/clientpositive/insert1.q.out
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/clientpositive/insert1.q.out?rev=734487&view=auto
==============================================================================
    (empty)



Mime
View raw message