You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ct...@apache.org on 2016/07/25 13:24:31 UTC

hive git commit: HIVE-14298: NPE could be thrown in HMS when an ExpressionTree could not be made from a filter (Chaoyu Tang, reviewed by Sergio Pena)

Repository: hive
Updated Branches:
  refs/heads/master 391335380 -> cd5147c7e


HIVE-14298: NPE could be thrown in HMS when an ExpressionTree could not be made from a filter (Chaoyu Tang, reviewed by Sergio Pena)


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

Branch: refs/heads/master
Commit: cd5147c7e759bce87c8af9370dbcf79fdc717eca
Parents: 3913353
Author: ctang <ct...@cloudera.com>
Authored: Mon Jul 25 09:24:01 2016 -0400
Committer: ctang <ct...@cloudera.com>
Committed: Mon Jul 25 09:24:01 2016 -0400

----------------------------------------------------------------------
 .../org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java    | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/cd5147c7/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java b/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
index 9c900af..8eeb1c4 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
@@ -984,6 +984,11 @@ class MetaStoreDirectSql {
         List<String> joins, boolean dbHasJoinCastBug, String defaultPartName, DB dbType)
             throws MetaException {
       assert table != null;
+      if (tree == null) {
+        // consistent with other APIs like makeExpressionTree, null is returned to indicate that
+        // the filter could not pushed down due to parsing issue etc
+        return null;
+      }
       if (tree.getRoot() == null) {
         return "";
       }