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

apurtell pushed a commit to branch PHOENIX-7876-feature
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/PHOENIX-7876-feature by this 
push:
     new 465860dbe2 PHOENIX-7897 Fix JoinQueryCompilerTest EXPLAIN assertions 
for HASH BUILD decorations (#2514)
465860dbe2 is described below

commit 465860dbe2720706056163e3d6f1275197f631ef
Author: Andrew Purtell <[email protected]>
AuthorDate: Wed Jun 10 19:03:37 2026 -0700

    PHOENIX-7897 Fix JoinQueryCompilerTest EXPLAIN assertions for HASH BUILD 
decorations (#2514)
    
    Co-authored-by: Claude Opus 4.8[1m] <[email protected]>
---
 .../org/apache/phoenix/compile/JoinQueryCompilerTest.java | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/compile/JoinQueryCompilerTest.java
 
b/phoenix-core/src/test/java/org/apache/phoenix/compile/JoinQueryCompilerTest.java
index c280192ee3..a036cd1c58 100644
--- 
a/phoenix-core/src/test/java/org/apache/phoenix/compile/JoinQueryCompilerTest.java
+++ 
b/phoenix-core/src/test/java/org/apache/phoenix/compile/JoinQueryCompilerTest.java
@@ -81,15 +81,18 @@ public class JoinQueryCompilerTest extends 
BaseConnectionlessQueryTest {
         + JOIN_SUPPLIER_TABLE_FULL_NAME
         + " s ON s.\"supplier_id\" = i.\"supplier_id\" WHERE i.name LIKE 'T%'";
     // RIGHT JOIN drives the scan over SUPPLIER, with the rest of the join 
tree nested as sub-plans.
+    // The outer join is swapped to build the left input (HASH BUILD LEFT). 
The nested left-join
+    // tree builds its right inputs (HASH BUILD RIGHT).
     assertPlan(conn, query).scanType("FULL 
SCAN").table(JOIN_SUPPLIER_TABLE_DISPLAY_NAME)
       .serverFirstKeyOnlyProjection(true)
       .afterJoinFilter("AFTER-JOIN SERVER FILTER BY I.NAME LIKE 
'T%'").subPlanCount(1).subPlan(0)
-      .abstractExplainPlan("PARALLEL LEFT-JOIN TABLE 0").scanType("FULL SCAN")
-      .table(JOIN_ORDER_TABLE_DISPLAY_NAME).subPlanCount(2).subPlan(0)
-      .abstractExplainPlan("PARALLEL LEFT-JOIN TABLE 0").scanType("FULL SCAN")
-      .table(JOIN_CUSTOMER_TABLE_DISPLAY_NAME).serverWhereFilter("SERVER 
FILTER BY NAME LIKE 'C%'")
-      .end().subPlan(1).abstractExplainPlan("PARALLEL LEFT-JOIN TABLE 
1").scanType("FULL SCAN")
-      .table(JOIN_ITEM_TABLE_DISPLAY_NAME).end().end();
+      .abstractExplainPlan("PARALLEL LEFT-JOIN TABLE 0  /* HASH BUILD LEFT */")
+      .scanType("FULL 
SCAN").table(JOIN_ORDER_TABLE_DISPLAY_NAME).subPlanCount(2).subPlan(0)
+      .abstractExplainPlan("PARALLEL LEFT-JOIN TABLE 0  /* HASH BUILD RIGHT 
*/")
+      .scanType("FULL SCAN").table(JOIN_CUSTOMER_TABLE_DISPLAY_NAME)
+      .serverWhereFilter("SERVER FILTER BY NAME LIKE 'C%'").end().subPlan(1)
+      .abstractExplainPlan("PARALLEL LEFT-JOIN TABLE 1  /* HASH BUILD RIGHT 
*/")
+      .scanType("FULL SCAN").table(JOIN_ITEM_TABLE_DISPLAY_NAME).end().end();
   }
 
   @Test

Reply via email to