This is an automated email from the ASF dual-hosted git repository.

vjasani pushed a commit to branch 5.1
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/5.1 by this push:
     new acb3a39d5d PHOENIX-6962 Write javadoc for different mutation plans 
within DeleteCompiler (#1619)
acb3a39d5d is described below

commit acb3a39d5dafb87fb4bac492934997b734753ddf
Author: Jing Yu <y...@salesforce.com>
AuthorDate: Fri Jun 9 13:47:06 2023 -0400

    PHOENIX-6962 Write javadoc for different mutation plans within 
DeleteCompiler (#1619)
---
 .../java/org/apache/phoenix/end2end/DeleteIT.java  |  2 +-
 .../org/apache/phoenix/compile/DeleteCompiler.java | 22 +++++++++++++++++++++-
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
index 104269e6d0..70bd77b8f0 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
@@ -1056,7 +1056,7 @@ public class DeleteIT extends ParallelStatsDisabledIT {
             DeleteStatement deleteStmt = (DeleteStatement) 
parser.parseStatement();
             DeleteCompiler compiler = new DeleteCompiler(stmt, null);
             MutationPlan plan = compiler.compile(deleteStmt);
-            assertEquals(plan.getClass(), planClass);
+            assertEquals(planClass, plan.getClass());
         }
     }
     private void createAndUpsertTable(String tableName, String indexName, 
Properties props,
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 8e6880d33c..4794a0c365 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
@@ -352,7 +352,12 @@ public class DeleteCompiler {
         }
         return Collections.emptyList();
     }
-    
+
+    /**
+     * Implementation of MutationPlan that is selected if
+     * 1) the query is strictly point lookup, and
+     * 2) the query has no LIMIT clause.
+     */
     public class MultiRowDeleteMutationPlan implements MutationPlan {
         private final List<MutationPlan> plans;
         private final MutationPlan firstPlan;
@@ -661,6 +666,9 @@ public class DeleteCompiler {
         }
     }
 
+    /**
+     * Implementation of MutationPlan for composing a 
MultiRowDeleteMutationPlan.
+     */
     private class SingleRowDeleteMutationPlan implements MutationPlan {
 
         private final QueryPlan dataPlan;
@@ -744,6 +752,14 @@ public class DeleteCompiler {
         }
     }
 
+    /**
+     * Implementation of MutationPlan that is selected if
+     * 1) there is no immutable index presented for the table,
+     * 2) auto commit is enabled as well as server side delete mutations are 
enabled,
+     * 3) the table is not transactional,
+     * 4) the query has no LIMIT clause, and
+     * 5) the query has WHERE clause and is not strictly point lookup.
+     */
     public class ServerSelectDeleteMutationPlan implements MutationPlan {
         private final StatementContext context;
         private final QueryPlan dataPlan;
@@ -868,6 +884,10 @@ public class DeleteCompiler {
         }
     }
 
+    /**
+     * Implementation of MutationPlan that is selected if the query doesn't 
match the criteria of
+     * ServerSelectDeleteMutationPlan.
+     */
     public class ClientSelectDeleteMutationPlan implements MutationPlan {
         private final StatementContext context;
         private final TableRef targetTableRef;

Reply via email to