You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ga...@apache.org on 2014/11/26 19:59:42 UTC

svn commit: r1641887 - in /hive/trunk/ql/src: java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java test/results/clientpositive/dynpart_sort_optimization_acid.q.out

Author: gates
Date: Wed Nov 26 18:59:42 2014
New Revision: 1641887

URL: http://svn.apache.org/r1641887
Log:
HIVE-8875 hive.optimize.sort.dynamic.partition should be turned off for ACID (Alan Gates, reviewed by Prasanth)

Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
    hive/trunk/ql/src/test/results/clientpositive/dynpart_sort_optimization_acid.q.out

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java?rev=1641887&r1=1641886&r2=1641887&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java Wed Nov 26 18:59:42 2014
@@ -6498,6 +6498,7 @@ public class SemanticAnalyzer extends Ba
     conf.setIntVar(ConfVars.HIVEOPTREDUCEDEDUPLICATIONMINREDUCER, 1);
     conf.setBoolVar(ConfVars.HIVE_HADOOP_SUPPORTS_SUBDIRECTORIES, true);
     conf.set(AcidUtils.CONF_ACID_KEY, "true");
+    conf.setBoolVar(ConfVars.HIVEOPTSORTDYNAMICPARTITION, false);
 
     if (table.getNumBuckets() < 1) {
       throw new SemanticException(ErrorMsg.ACID_OP_ON_NONACID_TABLE, table.getTableName());

Modified: hive/trunk/ql/src/test/results/clientpositive/dynpart_sort_optimization_acid.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/dynpart_sort_optimization_acid.q.out?rev=1641887&r1=1641886&r2=1641887&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/dynpart_sort_optimization_acid.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/dynpart_sort_optimization_acid.q.out Wed Nov 26 18:59:42 2014
@@ -1057,9 +1057,8 @@ POSTHOOK: query: explain update acid set
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
-  Stage-2 depends on stages: Stage-1
-  Stage-0 depends on stages: Stage-2
-  Stage-3 depends on stages: Stage-0
+  Stage-0 depends on stages: Stage-1
+  Stage-2 depends on stages: Stage-0
 
 STAGE PLANS:
   Stage: Stage-1
@@ -1075,6 +1074,7 @@ STAGE PLANS:
                 Reduce Output Operator
                   key expressions: _col0 (type: struct<transactionid:bigint,bucketid:int,rowid:bigint>)
                   sort order: +
+                  Map-reduce partition columns: UDFToInteger(_col0) (type: int)
                   value expressions: _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int)
       Reduce Operator Tree:
         Select Operator
@@ -1083,24 +1083,6 @@ STAGE PLANS:
           File Output Operator
             compressed: false
             table:
-                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
-
-  Stage: Stage-2
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            Reduce Output Operator
-              key expressions: _col3 (type: string), _col4 (type: int), '_bucket_number' (type: string), _col0 (type: struct<transactionid:bigint,bucketid:int,rowid:bigint>)
-              sort order: ++++
-              Map-reduce partition columns: _col3 (type: string), _col4 (type: int)
-              value expressions: _col0 (type: struct<transactionid:bigint,bucketid:int,rowid:bigint>), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int), '_bucket_number' (type: string)
-      Reduce Operator Tree:
-        Extract
-          File Output Operator
-            compressed: false
-            table:
                 input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
                 output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
                 serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
@@ -1119,7 +1101,7 @@ STAGE PLANS:
               serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
               name: default.acid
 
-  Stage: Stage-3
+  Stage: Stage-2
     Stats-Aggr Operator
 
 PREHOOK: query: update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr=11
@@ -1149,9 +1131,8 @@ POSTHOOK: query: explain update acid set
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
-  Stage-2 depends on stages: Stage-1
-  Stage-0 depends on stages: Stage-2
-  Stage-3 depends on stages: Stage-0
+  Stage-0 depends on stages: Stage-1
+  Stage-2 depends on stages: Stage-0
 
 STAGE PLANS:
   Stage: Stage-1
@@ -1167,6 +1148,7 @@ STAGE PLANS:
                 Reduce Output Operator
                   key expressions: _col0 (type: struct<transactionid:bigint,bucketid:int,rowid:bigint>)
                   sort order: +
+                  Map-reduce partition columns: UDFToInteger(_col0) (type: int)
                   value expressions: _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int)
       Reduce Operator Tree:
         Select Operator
@@ -1175,24 +1157,6 @@ STAGE PLANS:
           File Output Operator
             compressed: false
             table:
-                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe
-
-  Stage: Stage-2
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            Reduce Output Operator
-              key expressions: _col3 (type: string), _col4 (type: int), '_bucket_number' (type: string), _col0 (type: struct<transactionid:bigint,bucketid:int,rowid:bigint>)
-              sort order: ++++
-              Map-reduce partition columns: _col3 (type: string), _col4 (type: int)
-              value expressions: _col0 (type: struct<transactionid:bigint,bucketid:int,rowid:bigint>), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int), '_bucket_number' (type: string)
-      Reduce Operator Tree:
-        Extract
-          File Output Operator
-            compressed: false
-            table:
                 input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
                 output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
                 serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
@@ -1211,7 +1175,7 @@ STAGE PLANS:
               serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
               name: default.acid
 
-  Stage: Stage-3
+  Stage: Stage-2
     Stats-Aggr Operator
 
 PREHOOK: query: update acid set key = 'foo' where value = 'bar' and ds='2008-04-08' and hr>=11