-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add options to control hash join dynamic filter pushdown #19932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1115,6 +1115,18 @@ config_namespace! { | |
| /// See: <https://trino.io/docs/current/admin/dynamic-filtering.html#dynamic-filter-collection-thresholds> | ||
| pub hash_join_inlist_pushdown_max_distinct_values: usize, default = 150 | ||
|
|
||
| /// When true, pushes down hash table references for membership checks in hash joins | ||
| /// when the build side is too large for InList pushdown. | ||
| /// When false, no membership filter is created when InList thresholds are exceeded. | ||
| /// Default: true | ||
| pub hash_join_map_pushdown: bool, default = true | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps it is also good to differentiate between array map (
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (i.e. the one introduced in #19411) |
||
|
|
||
| /// When true, pushes down min/max bounds for join key columns. | ||
| /// This enables statistics-based pruning (e.g., Parquet row group skipping). | ||
| /// When false, only membership filters (InList or Map) are pushed down. | ||
| /// Default: true | ||
| pub hash_join_bounds_pushdown: bool, default = true | ||
|
Comment on lines
+1122
to
+1128
|
||
|
|
||
| /// The default filter selectivity used by Filter Statistics | ||
| /// when an exact selectivity cannot be determined. Valid values are | ||
| /// between 0 (no selectivity) and 100 (all rows are selected). | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation states "When false, no membership filter is created when InList thresholds are exceeded." This could be clearer. Consider rephrasing to: "When false, no hash table reference (Map) is used for membership checks. If the build side exceeds InList thresholds, no membership filter is created (only bounds, if enabled)." This makes it clearer that InList filters can still be created when the build side is small enough, and that this config specifically controls the Map fallback behavior.