phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pbo...@apache.org
Subject [14/32] phoenix git commit: PHOENIX-4790 Addendum to check that query is a point lookup for delete not to run query
Date Wed, 17 Oct 2018 19:40:12 GMT
PHOENIX-4790 Addendum to check that query is a point lookup for delete not to run query


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

Branch: refs/heads/4.14-cdh5.13
Commit: abba660ddea22abda4df927643bc63811c7e60d8
Parents: dc383eb
Author: James Taylor <jamestaylor@apache.org>
Authored: Thu Jul 12 06:01:14 2018 +0100
Committer: Pedro Boado <pboado@apache.org>
Committed: Wed Oct 17 20:35:44 2018 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/phoenix/compile/DeleteCompiler.java  | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/abba660d/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java b/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
index 78b2db9..a214c24 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
@@ -541,6 +541,9 @@ public class DeleteCompiler {
         Iterator<QueryPlan> iterator = queryPlans.iterator();
         while (iterator.hasNext()) {
             QueryPlan plan = iterator.next();
+            // Must be a point lookup in order to not run a query since
+            // we have to have the full key be enumerated.
+            noQueryReqd &= plan.getContext().getScanRanges().isPointLookup();
             if (plan.getTableRef().getTable().getIndexType() == IndexType.LOCAL) {
                 if (!plan.getContext().getDataColumns().isEmpty()) {
                     iterator.remove();


Mime
View raw message