Author: rhbutani
Date: Sun Apr 6 19:17:09 2014
New Revision: 1585332
URL: http://svn.apache.org/r1585332
Log:
HIVE-6834 Dynamic partition optimization bails out after removing file sink
operator (Prasanth J via Harish Butani)
Modified:
hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java
Modified:
hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java
URL:
http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java?rev=1585332&r1=1585331&r2=1585332&view=diff
==============================================================================
---
hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java
(original)
+++
hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java
Sun Apr 6 19:17: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.