hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From x..@apache.org
Subject [11/50] [abbrv] hive git commit: HIVE-10175: DynamicPartitionPruning lacks a fast-path exit for large IN() queries (Gopal V, reviewed by Jesus Camacho Rodriguez)
Date Wed, 09 Sep 2015 07:08:41 GMT
HIVE-10175: DynamicPartitionPruning lacks a fast-path exit for large IN() queries (Gopal V,
reviewed by Jesus Camacho Rodriguez)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/b6d1143a
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/b6d1143a
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/b6d1143a

Branch: refs/heads/beeline-cli
Commit: b6d1143aa7aaa20de035898f34df2d6b581895b6
Parents: d147a79
Author: Gopal V <gopalv@apache.org>
Authored: Fri Aug 28 01:22:45 2015 -0700
Committer: Gopal V <gopalv@apache.org>
Committed: Fri Aug 28 01:22:45 2015 -0700

----------------------------------------------------------------------
 .../optimizer/DynamicPartitionPruningOptimization.java  | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/b6d1143a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/DynamicPartitionPruningOptimization.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/DynamicPartitionPruningOptimization.java
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/DynamicPartitionPruningOptimization.java
index f475926..5ebd28a 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/DynamicPartitionPruningOptimization.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/DynamicPartitionPruningOptimization.java
@@ -189,6 +189,18 @@ public class DynamicPartitionPruningOptimization implements NodeProcessor
{
       LOG.debug("TableScan: " + ts);
     }
 
+    if (ts == null) {
+      // could be a reduce sink
+      LOG.warn("Could not find the table scan for " + filter); 
+      return null;
+    } else {
+      Table table = ts.getConf().getTableMetadata();
+      if (table != null && !table.isPartitioned()) {
+        // table is not partitioned, skip optimizer
+        return null;
+      }
+    }
+
     // collect the dynamic pruning conditions
     removerContext.dynLists.clear();
     walkExprTree(desc.getPredicate(), removerContext);


Mime
View raw message