hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhbut...@apache.org
Subject svn commit: r1585330 - /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java
Date Sun, 06 Apr 2014 19:16:09 GMT
Author: rhbutani
Date: Sun Apr  6 19:16:09 2014
New Revision: 1585330

URL: http://svn.apache.org/r1585330
Log:
HIVE-6834 Dynamic partition optimization bails out after removing file sink operator (Prasanth
J via Harish Butani)

Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java?rev=1585330&r1=1585329&r2=1585330&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java
(original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java
Sun Apr  6 19:16:09 2014
@@ -141,6 +141,12 @@ public class SortedDynPartitionOptimizer
         return null;
       }
 
+      Table destTable = parseCtx.getFsopToTable().get(fsOp);
+      if (destTable == null) {
+        LOG.debug("Bailing out of sort dynamic partition optimization as destination table
is null");
+        return null;
+      }
+
       // if RS is inserted by enforce bucketing or sorting, we need to remove it
       // since ReduceSinkDeDuplication will not merge them to single RS.
       // RS inserted by enforce bucketing/sorting will have bucketing column in
@@ -156,11 +162,6 @@ public class SortedDynPartitionOptimizer
       fsParent.getChildOperators().clear();
 
       DynamicPartitionCtx dpCtx = fsOp.getConf().getDynPartCtx();
-      Table destTable = parseCtx.getFsopToTable().get(fsOp);
-      if (destTable == null) {
-        LOG.debug("Bailing out of sort dynamic partition optimization as destination table
is null");
-        return null;
-      }
       int numBuckets = destTable.getNumBuckets();
 
       // if enforce bucketing/sorting is disabled numBuckets will not be set.



Mime
View raw message