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

yashmayya pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 0d21654dfc8 Disable JOIN_PUSH_TRANSITIVE_PREDICATES optimization rule 
by default (#17181)
0d21654dfc8 is described below

commit 0d21654dfc8c1d3c13723139d0f891b5f5021d23
Author: Yash Mayya <[email protected]>
AuthorDate: Wed Nov 19 13:37:15 2025 -0500

    Disable JOIN_PUSH_TRANSITIVE_PREDICATES optimization rule by default 
(#17181)
---
 .../java/org/apache/pinot/query/QueryCompilationTest.java     |  2 +-
 .../src/test/resources/queries/ExplainPhysicalPlans.json      |  6 ++----
 pinot-query-planner/src/test/resources/queries/JoinPlans.json | 11 ++++-------
 .../src/test/resources/queries/PhysicalOptimizerPlans.json    |  7 +++----
 .../main/java/org/apache/pinot/spi/utils/CommonConstants.java |  3 ++-
 5 files changed, 12 insertions(+), 17 deletions(-)

diff --git 
a/pinot-query-planner/src/test/java/org/apache/pinot/query/QueryCompilationTest.java
 
b/pinot-query-planner/src/test/java/org/apache/pinot/query/QueryCompilationTest.java
index c91fa1ef4a0..6f204f9b7ee 100644
--- 
a/pinot-query-planner/src/test/java/org/apache/pinot/query/QueryCompilationTest.java
+++ 
b/pinot-query-planner/src/test/java/org/apache/pinot/query/QueryCompilationTest.java
@@ -156,7 +156,7 @@ public class QueryCompilationTest extends 
QueryEnvironmentTestBase {
   public void testJoinPushTransitivePredicate() {
     // queries involving extra predicate on join keys
     // should be optimized to push the predicate to both sides of the join if 
applicable
-    String query = "EXPLAIN PLAN FOR\n"
+    String query = "SET usePlannerRules='JoinPushTransitivePredicates'; 
EXPLAIN PLAN FOR\n"
         + "SELECT * FROM a\n"
         + "JOIN b\n"
         + "ON a.col1 = b.col1\n"
diff --git 
a/pinot-query-planner/src/test/resources/queries/ExplainPhysicalPlans.json 
b/pinot-query-planner/src/test/resources/queries/ExplainPhysicalPlans.json
index 8f856b5195b..70258c60103 100644
--- a/pinot-query-planner/src/test/resources/queries/ExplainPhysicalPlans.json
+++ b/pinot-query-planner/src/test/resources/queries/ExplainPhysicalPlans.json
@@ -152,8 +152,7 @@
           "                └── [2]@localhost:1|[1] AGGREGATE_LEAF\n",
           "                    └── [2]@localhost:1|[1] JOIN\n",
           "                        ├── [2]@localhost:1|[1] PROJECT\n",
-          "                        │   └── [2]@localhost:1|[1] FILTER\n",
-          "                        │       └── [2]@localhost:1|[1] TABLE SCAN 
(a) null\n",
+          "                        │   └── [2]@localhost:1|[1] TABLE SCAN (a) 
null\n",
           "                        └── [2]@localhost:1|[1] 
MAIL_RECEIVE(BROADCAST_DISTRIBUTED)\n",
           "                            ├── [3]@localhost:2|[2] 
MAIL_SEND(BROADCAST_DISTRIBUTED)->{[2]@localhost:1|[0, 1],[2]@localhost:2|[2, 
3]} (Subtree Omitted)\n",
           "                            ├── [3]@localhost:2|[3] 
MAIL_SEND(BROADCAST_DISTRIBUTED)->{[2]@localhost:1|[0, 1],[2]@localhost:2|[2, 
3]} (Subtree Omitted)\n",
@@ -180,8 +179,7 @@
           "                └── [2]@localhost:1|[1] AGGREGATE_LEAF\n",
           "                    └── [2]@localhost:1|[1] JOIN\n",
           "                        ├── [2]@localhost:1|[1] PROJECT\n",
-          "                        │   └── [2]@localhost:1|[1] FILTER\n",
-          "                        │       └── [2]@localhost:1|[1] TABLE SCAN 
(a) null\n",
+          "                        │   └── [2]@localhost:1|[1] TABLE SCAN (a) 
null\n",
           "                        └── [2]@localhost:1|[1] 
MAIL_RECEIVE(HASH_DISTRIBUTED)\n",
           "                            ├── [3]@localhost:2|[2] 
MAIL_SEND(HASH_DISTRIBUTED)[PARTITIONED]->{[2]@localhost:2|[2]} (Subtree 
Omitted)\n",
           "                            ├── [3]@localhost:2|[3] 
MAIL_SEND(HASH_DISTRIBUTED)[PARTITIONED]->{[2]@localhost:2|[3]} (Subtree 
Omitted)\n",
diff --git a/pinot-query-planner/src/test/resources/queries/JoinPlans.json 
b/pinot-query-planner/src/test/resources/queries/JoinPlans.json
index 09b5881702b..655f8c2e408 100644
--- a/pinot-query-planner/src/test/resources/queries/JoinPlans.json
+++ b/pinot-query-planner/src/test/resources/queries/JoinPlans.json
@@ -518,8 +518,7 @@
           "\nLogicalJoin(condition=[=($2, $9)], joinType=[semi])",
           "\n  LogicalJoin(condition=[=($1, $9)], joinType=[semi])",
           "\n    LogicalJoin(condition=[=($1, $9)], joinType=[semi])",
-          "\n      LogicalFilter(condition=[<($2, 100)])",
-          "\n        PinotLogicalTableScan(table=[[default, a]])",
+          "\n      PinotLogicalTableScan(table=[[default, a]])",
           "\n      PinotLogicalExchange(distribution=[broadcast], 
relExchangeType=[PIPELINE_BREAKER])",
           "\n        LogicalProject(col1=[$0])",
           "\n          LogicalFilter(condition=[SEARCH($1, 
Sarg[(-∞.._UTF-8'bar':VARCHAR CHARACTER SET \"UTF-8\"), (_UTF-8'bar':VARCHAR 
CHARACTER SET \"UTF-8\".._UTF-8'foo':VARCHAR CHARACTER SET \"UTF-8\"), 
(_UTF-8'foo':VARCHAR CHARACTER SET \"UTF-8\"..+∞)]:VARCHAR CHARACTER SET 
\"UTF-8\")])",
@@ -547,8 +546,7 @@
           "\n        LogicalProject(col3=[$1])",
           "\n          LogicalJoin(condition=[=($0, $2)], joinType=[semi])",
           "\n            LogicalProject(col2=[$1], col3=[$2])",
-          "\n              LogicalFilter(condition=[<($2, 100)])",
-          "\n                PinotLogicalTableScan(table=[[default, a]])",
+          "\n              PinotLogicalTableScan(table=[[default, a]])",
           "\n            PinotLogicalExchange(distribution=[broadcast], 
relExchangeType=[PIPELINE_BREAKER])",
           "\n              LogicalProject(col1=[$0])",
           "\n                LogicalFilter(condition=[SEARCH($1, 
Sarg[(-∞.._UTF-8'bar':VARCHAR CHARACTER SET \"UTF-8\"), (_UTF-8'bar':VARCHAR 
CHARACTER SET \"UTF-8\".._UTF-8'foo':VARCHAR CHARACTER SET \"UTF-8\"), 
(_UTF-8'foo':VARCHAR CHARACTER SET \"UTF-8\"..+∞)]:VARCHAR CHARACTER SET 
\"UTF-8\")])",
@@ -573,8 +571,7 @@
           "\n            LogicalProject(col1=[$0], col3=[$2])",
           "\n              LogicalJoin(condition=[=($1, $3)], 
joinType=[semi])",
           "\n                LogicalProject(col1=[$0], col2=[$1], col3=[$2])",
-          "\n                  LogicalFilter(condition=[<($2, 100)])",
-          "\n                    PinotLogicalTableScan(table=[[default, a]])",
+          "\n                  PinotLogicalTableScan(table=[[default, a]])",
           "\n                PinotLogicalExchange(distribution=[broadcast], 
relExchangeType=[PIPELINE_BREAKER])",
           "\n                  LogicalProject(col1=[$0])",
           "\n                    LogicalFilter(condition=[SEARCH($1, 
Sarg[(-∞.._UTF-8'bar':VARCHAR CHARACTER SET \"UTF-8\"), (_UTF-8'bar':VARCHAR 
CHARACTER SET \"UTF-8\".._UTF-8'foo':VARCHAR CHARACTER SET \"UTF-8\"), 
(_UTF-8'foo':VARCHAR CHARACTER SET \"UTF-8\"..+∞)]:VARCHAR CHARACTER SET 
\"UTF-8\")])",
@@ -601,7 +598,7 @@
           "\n          PinotLogicalTableScan(table=[[default, a]])",
           "\n  PinotLogicalExchange(distribution=[broadcast], 
relExchangeType=[PIPELINE_BREAKER])",
           "\n    LogicalProject(col3=[$2])",
-          "\n      LogicalFilter(condition=[AND(SEARCH($1, 
Sarg[(-∞.._UTF-8'bar':VARCHAR CHARACTER SET \"UTF-8\"), (_UTF-8'bar':VARCHAR 
CHARACTER SET \"UTF-8\".._UTF-8'foo':VARCHAR CHARACTER SET \"UTF-8\"), 
(_UTF-8'foo':VARCHAR CHARACTER SET \"UTF-8\"..+∞)]:VARCHAR CHARACTER SET 
\"UTF-8\"), <($2, 100))])",
+          "\n      LogicalFilter(condition=[SEARCH($1, 
Sarg[(-∞.._UTF-8'bar':VARCHAR CHARACTER SET \"UTF-8\"), (_UTF-8'bar':VARCHAR 
CHARACTER SET \"UTF-8\".._UTF-8'foo':VARCHAR CHARACTER SET \"UTF-8\"), 
(_UTF-8'foo':VARCHAR CHARACTER SET \"UTF-8\"..+∞)]:VARCHAR CHARACTER SET 
\"UTF-8\")])",
           "\n        PinotLogicalTableScan(table=[[default, a]])",
           "\n"
         ]
diff --git 
a/pinot-query-planner/src/test/resources/queries/PhysicalOptimizerPlans.json 
b/pinot-query-planner/src/test/resources/queries/PhysicalOptimizerPlans.json
index c1294348522..29e4a378da7 100644
--- a/pinot-query-planner/src/test/resources/queries/PhysicalOptimizerPlans.json
+++ b/pinot-query-planner/src/test/resources/queries/PhysicalOptimizerPlans.json
@@ -72,14 +72,13 @@
           "\n        PhysicalJoin(condition=[=($0, $1)], joinType=[semi])",
           "\n          
PhysicalExchange(exchangeStrategy=[PARTITIONING_EXCHANGE], distKeys=[[0]])",
           "\n            PhysicalProject(col1=[$0])",
-          "\n              PhysicalFilter(condition=[=($0, _UTF-8'foo')])",
-          "\n                PhysicalTableScan(table=[[default, a]])",
+          "\n              PhysicalTableScan(table=[[default, a]])",
           "\n          
PhysicalExchange(exchangeStrategy=[PARTITIONING_EXCHANGE], distKeys=[[0]])",
           "\n            PhysicalProject(name=[$1])",
           "\n              PhysicalJoin(condition=[=($0, $2)], 
joinType=[inner])",
-          "\n                PhysicalValues(tuples=[[]])",
+          "\n                PhysicalValues(tuples=[[{ 1, _UTF-8'foo' }]])",
           "\n                PhysicalProject(EXPR$0=[$0])",
-          "\n                  PhysicalValues(tuples=[[]])",
+          "\n                  PhysicalValues(tuples=[[{ 2, _UTF-8'bar' }]])",
           "\n"
         ]
       }
diff --git 
a/pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java 
b/pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java
index 701ec0d69ba..db3adb17963 100644
--- a/pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java
+++ b/pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java
@@ -914,7 +914,8 @@ public class CommonConstants {
         PlannerRuleNames.SORT_JOIN_COPY,
         PlannerRuleNames.AGGREGATE_UNION_AGGREGATE,
         PlannerRuleNames.JOIN_TO_ENRICHED_JOIN,
-        PlannerRuleNames.AGGREGATE_FUNCTION_REWRITE
+        PlannerRuleNames.AGGREGATE_FUNCTION_REWRITE,
+        PlannerRuleNames.JOIN_PUSH_TRANSITIVE_PREDICATES
     );
 
     public static class FailureDetector {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to