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

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


The following commit(s) were added to refs/heads/master by this push:
     new 5394838030 Enable conversion of join to filter by default (#12868)
5394838030 is described below

commit 53948380305d8495285aa6db2f49e6348d57049f
Author: Rohan Garg <[email protected]>
AuthorDate: Sat Aug 13 20:37:43 2022 +0530

    Enable conversion of join to filter by default (#12868)
---
 docs/querying/query-context.md                                       | 1 +
 processing/src/main/java/org/apache/druid/query/QueryContexts.java   | 2 +-
 sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java | 3 ---
 website/.spelling                                                    | 1 +
 4 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/docs/querying/query-context.md b/docs/querying/query-context.md
index bded042ecb..5a4b2fc641 100644
--- a/docs/querying/query-context.md
+++ b/docs/querying/query-context.md
@@ -93,6 +93,7 @@ Some query types offer context parameters specific to that 
query type.
 |enableJoinFilterPushDown | `true` | Controls whether a join query will 
attempt filter push down, which reduces the number of rows that have to be 
compared in a join operation.|
 |enableJoinFilterRewrite | `true` | Controls whether filter clauses that 
reference non-base table columns will be rewritten into filters on base table 
columns.|
 |enableJoinFilterRewriteValueColumnFilters | `false` | Controls whether Druid 
rewrites non-base table filters on non-key columns in the non-base table. 
Requires a scan of the non-base table.|
+|enableRewriteJoinToFilter | `true` | Controls whether a join can be pushed 
partial or fully to the base table as a filter at runtime.|
 |joinFilterRewriteMaxSize | `10000` | The maximum size of the correlated value 
set used for filter rewrites. Set this limit to prevent excessive memory use.| 
 
 ### GroupBy
diff --git a/processing/src/main/java/org/apache/druid/query/QueryContexts.java 
b/processing/src/main/java/org/apache/druid/query/QueryContexts.java
index e531869ac5..416760cb43 100644
--- a/processing/src/main/java/org/apache/druid/query/QueryContexts.java
+++ b/processing/src/main/java/org/apache/druid/query/QueryContexts.java
@@ -95,7 +95,7 @@ public class QueryContexts
   public static final boolean DEFAULT_ENABLE_JOIN_FILTER_PUSH_DOWN = true;
   public static final boolean DEFAULT_ENABLE_JOIN_FILTER_REWRITE = true;
   public static final boolean 
DEFAULT_ENABLE_JOIN_FILTER_REWRITE_VALUE_COLUMN_FILTERS = false;
-  public static final boolean DEFAULT_ENABLE_REWRITE_JOIN_TO_FILTER = false;
+  public static final boolean DEFAULT_ENABLE_REWRITE_JOIN_TO_FILTER = true;
   public static final long DEFAULT_ENABLE_JOIN_FILTER_REWRITE_MAX_SIZE = 10000;
   public static final boolean DEFAULT_ENABLE_SQL_JOIN_LEFT_SCAN_DIRECT = false;
   public static final boolean DEFAULT_USE_FILTER_CNF = false;
diff --git 
a/sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java 
b/sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java
index 39e5dcd799..1b3f2ce21b 100644
--- a/sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java
+++ b/sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java
@@ -3843,9 +3843,6 @@ public class CalciteQueryTest extends BaseCalciteQueryTest
   @Test
   public void testGroupingWithNullInFilter() throws Exception
   {
-    // HashJoinSegmentStorageAdapter is not vectorizable
-    cannotVectorize();
-
     testQuery(
         "SELECT COUNT(*) FROM foo WHERE dim1 IN (NULL)",
         ImmutableList.of(
diff --git a/website/.spelling b/website/.spelling
index 52ed82098c..ad1ccc318b 100644
--- a/website/.spelling
+++ b/website/.spelling
@@ -1652,6 +1652,7 @@ enableParallelMerge
 enableJoinLeftTableScanDirect
 enableJoinFilterPushDown
 enableJoinFilterRewrite
+enableRewriteJoinToFilter
 enableJoinFilterRewriteValueColumnFilters
 floatSum
 joinFilterRewriteMaxSize


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

Reply via email to