hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vik...@apache.org
Subject svn commit: r1580797 - in /hive/branches/branch-0.13/ql/src: java/org/apache/hadoop/hive/ql/io/HiveInputFormat.java test/queries/clientpositive/tez_dml.q test/results/clientpositive/tez/tez_dml.q.out
Date Mon, 24 Mar 2014 09:57:42 GMT
Author: vikram
Date: Mon Mar 24 09:57:42 2014
New Revision: 1580797

URL: http://svn.apache.org/r1580797
Log:
HIVE-6707 : Lazy maps are broken (LazyMap and LazyBinaryMap) (Prasanth J via Vikram Dixit,
reviewed by Gunther)

Modified:
    hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/io/HiveInputFormat.java
    hive/branches/branch-0.13/ql/src/test/queries/clientpositive/tez_dml.q
    hive/branches/branch-0.13/ql/src/test/results/clientpositive/tez/tez_dml.q.out

Modified: hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/io/HiveInputFormat.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/io/HiveInputFormat.java?rev=1580797&r1=1580796&r2=1580797&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/io/HiveInputFormat.java
(original)
+++ hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/io/HiveInputFormat.java
Mon Mar 24 09:57:42 2014
@@ -308,10 +308,6 @@ public class HiveInputFormat<K extends W
         try {
           List<Path> paths = Utilities.getInputPathsTez(job, mrwork);
           dirs = paths.toArray(new Path[paths.size()]);
-          if (dirs.length == 0) {
-            // if we still don't have any files it's time to fail.
-            throw new IOException("No input paths specified in job");
-          }
         } catch (Exception e) {
           throw new IOException("Could not create input files", e);
         }
@@ -373,11 +369,13 @@ public class HiveInputFormat<K extends W
       currentInputFormatClass = inputFormatClass;
     }
 
-    LOG.info("Generating splits");
-    addSplitsForGroup(currentDirs, currentTableScan, newjob,
-        getInputFormatFromCache(currentInputFormatClass, job),
-        currentInputFormatClass, currentDirs.size()*(numSplits / dirs.length),
-        currentTable, result);
+    if (dirs.length != 0) {
+      LOG.info("Generating splits");
+      addSplitsForGroup(currentDirs, currentTableScan, newjob,
+          getInputFormatFromCache(currentInputFormatClass, job),
+          currentInputFormatClass, currentDirs.size()*(numSplits / dirs.length),
+          currentTable, result);
+    }
 
     LOG.info("number of splits " + result.size());
     perfLogger.PerfLogEnd(CLASS_NAME, PerfLogger.GET_SPLITS);

Modified: hive/branches/branch-0.13/ql/src/test/queries/clientpositive/tez_dml.q
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/queries/clientpositive/tez_dml.q?rev=1580797&r1=1580796&r2=1580797&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/queries/clientpositive/tez_dml.q (original)
+++ hive/branches/branch-0.13/ql/src/test/queries/clientpositive/tez_dml.q Mon Mar 24 09:57:42
2014
@@ -29,6 +29,10 @@ INSERT INTO TABLE odd SELECT key, value 
 SELECT * FROM even;
 SELECT * FROM odd;
 
+-- create empty table
+CREATE TABLE empty STORED AS orc AS SELECT * FROM tmp_src_part WHERE d = -1000;
+SELECT * FROM empty;
+
 -- drop the tables
 DROP TABLE even;
 DROP TABLE odd;

Modified: hive/branches/branch-0.13/ql/src/test/results/clientpositive/tez/tez_dml.q.out
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientpositive/tez/tez_dml.q.out?rev=1580797&r1=1580796&r2=1580797&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/test/results/clientpositive/tez/tez_dml.q.out (original)
+++ hive/branches/branch-0.13/ql/src/test/results/clientpositive/tez/tez_dml.q.out Mon Mar
24 09:57:42 2014
@@ -1499,6 +1499,41 @@ POSTHOOK: Lineage: tmp_src_part PARTITIO
 169	val_169
 403	val_403
 97	val_97
+PREHOOK: query: -- create empty table
+CREATE TABLE empty STORED AS orc AS SELECT * FROM tmp_src_part WHERE d = -1000
+PREHOOK: type: CREATETABLE_AS_SELECT
+PREHOOK: Input: default@tmp_src_part
+POSTHOOK: query: -- create empty table
+CREATE TABLE empty STORED AS orc AS SELECT * FROM tmp_src_part WHERE d = -1000
+POSTHOOK: type: CREATETABLE_AS_SELECT
+POSTHOOK: Input: default@tmp_src_part
+POSTHOOK: Output: default@empty
+POSTHOOK: Lineage: even.c EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default),
]
+POSTHOOK: Lineage: even.d SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default),
]
+POSTHOOK: Lineage: odd.c EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default),
]
+POSTHOOK: Lineage: odd.d SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default),
]
+POSTHOOK: Lineage: tmp_src_part PARTITION(d=1).c SIMPLE [(tmp_src)tmp_src.FieldSchema(name:value,
type:string, comment:null), ]
+POSTHOOK: Lineage: tmp_src_part PARTITION(d=2).c SIMPLE [(tmp_src)tmp_src.FieldSchema(name:value,
type:string, comment:null), ]
+POSTHOOK: Lineage: tmp_src_part PARTITION(d=3).c SIMPLE [(tmp_src)tmp_src.FieldSchema(name:value,
type:string, comment:null), ]
+POSTHOOK: Lineage: tmp_src_part PARTITION(d=4).c SIMPLE [(tmp_src)tmp_src.FieldSchema(name:value,
type:string, comment:null), ]
+POSTHOOK: Lineage: tmp_src_part PARTITION(d=5).c SIMPLE [(tmp_src)tmp_src.FieldSchema(name:value,
type:string, comment:null), ]
+PREHOOK: query: SELECT * FROM empty
+PREHOOK: type: QUERY
+PREHOOK: Input: default@empty
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT * FROM empty
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@empty
+#### A masked pattern was here ####
+POSTHOOK: Lineage: even.c EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default),
]
+POSTHOOK: Lineage: even.d SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default),
]
+POSTHOOK: Lineage: odd.c EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default),
]
+POSTHOOK: Lineage: odd.d SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default),
]
+POSTHOOK: Lineage: tmp_src_part PARTITION(d=1).c SIMPLE [(tmp_src)tmp_src.FieldSchema(name:value,
type:string, comment:null), ]
+POSTHOOK: Lineage: tmp_src_part PARTITION(d=2).c SIMPLE [(tmp_src)tmp_src.FieldSchema(name:value,
type:string, comment:null), ]
+POSTHOOK: Lineage: tmp_src_part PARTITION(d=3).c SIMPLE [(tmp_src)tmp_src.FieldSchema(name:value,
type:string, comment:null), ]
+POSTHOOK: Lineage: tmp_src_part PARTITION(d=4).c SIMPLE [(tmp_src)tmp_src.FieldSchema(name:value,
type:string, comment:null), ]
+POSTHOOK: Lineage: tmp_src_part PARTITION(d=5).c SIMPLE [(tmp_src)tmp_src.FieldSchema(name:value,
type:string, comment:null), ]
 PREHOOK: query: -- drop the tables
 DROP TABLE even
 PREHOOK: type: DROPTABLE



Mime
View raw message