You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by si...@apache.org on 2022/11/10 19:58:12 UTC

[pinot] branch master updated: [hotfix] semi-join opt (#9779)

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

siddteotia 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 d24f31ca76 [hotfix] semi-join opt (#9779)
d24f31ca76 is described below

commit d24f31ca76d5c4ca3d426f88b68afad93d51a9bf
Author: Rong Rong <ro...@apache.org>
AuthorDate: Thu Nov 10 11:58:04 2022 -0800

    [hotfix] semi-join opt (#9779)
    
    Co-authored-by: Rong Rong <ro...@startree.ai>
---
 .../src/main/java/org/apache/calcite/rel/rules/PinotQueryRuleSets.java | 3 ---
 .../src/test/java/org/apache/pinot/query/QueryTestSet.java             | 3 ++-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/pinot-query-planner/src/main/java/org/apache/calcite/rel/rules/PinotQueryRuleSets.java b/pinot-query-planner/src/main/java/org/apache/calcite/rel/rules/PinotQueryRuleSets.java
index c9a55e91cf..4ed6be0a23 100644
--- a/pinot-query-planner/src/main/java/org/apache/calcite/rel/rules/PinotQueryRuleSets.java
+++ b/pinot-query-planner/src/main/java/org/apache/calcite/rel/rules/PinotQueryRuleSets.java
@@ -81,9 +81,6 @@ public class PinotQueryRuleSets {
           // remove unnecessary sort rule
           CoreRules.SORT_REMOVE,
 
-          // projection to SEMI JOIN.
-          CoreRules.PROJECT_TO_SEMI_JOIN,
-
           // prune empty results rules
           PruneEmptyRules.AGGREGATE_INSTANCE, PruneEmptyRules.FILTER_INSTANCE, PruneEmptyRules.JOIN_LEFT_INSTANCE,
           PruneEmptyRules.JOIN_RIGHT_INSTANCE, PruneEmptyRules.PROJECT_INSTANCE, PruneEmptyRules.SORT_INSTANCE,
diff --git a/pinot-query-runtime/src/test/java/org/apache/pinot/query/QueryTestSet.java b/pinot-query-runtime/src/test/java/org/apache/pinot/query/QueryTestSet.java
index 575efcc903..7d634cfe4a 100644
--- a/pinot-query-runtime/src/test/java/org/apache/pinot/query/QueryTestSet.java
+++ b/pinot-query-runtime/src/test/java/org/apache/pinot/query/QueryTestSet.java
@@ -163,7 +163,8 @@ public class QueryTestSet {
             + "  (SELECT a.col2 AS joinKey, MAX(a.col3) AS maxVal FROM a GROUP BY a.col2) AS i "
             + "  ON b.col1 = i.joinKey"},
 
-        // Sub-query with IN clause to SEMI JOIN.
+        // Sub-query with predicate clause to SEMI JOIN.
+        new Object[]{"SELECT * FROM b WHERE b.col1 IN (SELECT a.col2 FROM a)"},
         new Object[]{"SELECT b.col1, b.col2, SUM(b.col3) * 100 / COUNT(b.col3) FROM b WHERE b.col1 IN "
             + " (SELECT a.col2 FROM a WHERE a.col2 != 'foo') GROUP BY b.col1, b.col2"},
         new Object[]{"SELECT SUM(b.col3) FROM b WHERE b.col3 > (SELECT AVG(a.col3) FROM a WHERE a.col2 != 'bar')"},


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org