You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by el...@apache.org on 2018/07/25 22:34:57 UTC
[34/50] [abbrv] phoenix git commit: PHOENIX-4790 Addendum to check
that query is a point lookup for delete not to run query
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/ab930f49
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/ab930f49
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/ab930f49
Branch: refs/heads/master
Commit: ab930f49762e5ccf3f4ac108a2402552753f0d6a
Parents: b91d7b0
Author: James Taylor <ja...@apache.org>
Authored: Wed Jul 11 22:01:14 2018 -0700
Committer: James Taylor <ja...@apache.org>
Committed: Wed Jul 11 22:06:13 2018 -0700
----------------------------------------------------------------------
.../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/ab930f49/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 f4e8896..34c1590 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
@@ -542,6 +542,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();