You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ja...@apache.org on 2017/11/09 20:58:22 UTC

[14/20] phoenix git commit: PHOENIX-4287 Add null check for parent name

PHOENIX-4287 Add null check for parent name


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

Branch: refs/heads/5.x-HBase-2.0
Commit: cdec8149886581f4a3bffa4fe6c9cdf2e8c0ff75
Parents: 072ff58
Author: Samarth Jain <sa...@apache.org>
Authored: Thu Nov 2 17:52:32 2017 -0700
Committer: James Taylor <jt...@salesforce.com>
Committed: Thu Nov 9 12:52:19 2017 -0800

----------------------------------------------------------------------
 .../java/org/apache/phoenix/iterate/BaseResultIterators.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/cdec8149/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
index 9010a64..f6052a7 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
@@ -1246,9 +1246,10 @@ public abstract class BaseResultIterators extends ExplainTable implements Result
         }
         /*
          * For a view index, we use the property set on view. For indexes on base table, whether
-         * global or local, we use the property set on the base table.
+         * global or local, we use the property set on the base table. Null check needed when
+         * dropping local indexes.
          */
-        if (table.getType() == PTableType.INDEX) {
+        if (table.getType() == PTableType.INDEX && table.getParentName() != null) {
             PhoenixConnection conn = context.getConnection();
             String parentTableName = table.getParentName().getString();
             try {