Skip to content

Rename setting enable_join_runtime_filter_shared_fixed_hash_table to join_runtime_filter_from_fixed_hash_table - #107668

Merged
rschu1ze merged 1 commit into
masterfrom
rename-rt-filter-setting
Jun 17, 2026
Merged

rschu1ze merged 1 commit into
masterfrom
rename-rt-filter-setting

Conversation

@rschu1ze

@rschu1ze rschu1ze commented Jun 16, 2026 •

Copy link
Copy Markdown
Member

Makes the name more consistent with the existing settings for runtime filters

Follow-up to #105640

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Version info

  • Merged into: 26.6.1.938

…o `join_runtime_filter_from_fixed_hash_table`

Makes the name more consistent with the existing settings for runtime filters

Follow-up to #105640
@clickhouse-gh

clickhouse-gh Bot commented Jun 16, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [3cb0982]

Summary: ❌

job_name test_name status info comment
Performance Comparison (arm_release, master_head, 4/6) FAIL Performance dashboard
array_reduce #2::old FAIL query history IGNORED
array_reduce #2::new FAIL query history IGNORED
array_reduce #3::old FAIL query history IGNORED
array_reduce #3::new FAIL query history IGNORED
asof #3::old FAIL query history IGNORED
asof #3::new FAIL query history IGNORED
hash_table_sizes_stats #3::old FAIL query history IGNORED
hash_table_sizes_stats #3::new FAIL query history IGNORED
hash_table_sizes_stats #5::old FAIL query history IGNORED
hash_table_sizes_stats #5::new FAIL query history IGNORED
8 more test cases not shown
Stateless tests (arm_asan_ubsan, targeted) ERROR IGNORED

AI Review

Summary

This PR renames the fixed-hash-table runtime-filter setting to join_runtime_filter_from_fixed_hash_table and updates the join/runtime-filter consumers and stateless test. The normal user-facing setting rename is acceptable given the author's note that the old name was not released, but the same rename still needs a compatibility alias in query-plan serialization because serialized plans carry setting names on the wire.

Findings

⚠️ Majors

  • [src/Processors/QueryPlan/QueryPlanSerializationSettings.cpp:116] QueryPlanSerializationSettings promises that serialized plan steps can be reconstructed from the settings stream, but the rename changes the serialized setting name without leaving an alias for enable_join_runtime_filter_shared_fixed_hash_table. QueryPlanSerializationSettings::writeChangedBinary writes changed settings by name, and BaseSettings::readBinary resolves aliases before throwing UNKNOWN_SETTING; a plan produced by a node that still writes the old name, for example with the setting explicitly disabled, cannot be read by this code during a mixed-version rollout. Use the alias form in PLAN_SERIALIZATION_SETTINGS, mapping enable_join_runtime_filter_shared_fixed_hash_table to join_runtime_filter_from_fixed_hash_table.
Final Verdict

Status: ⚠️ Request changes

Minimum required action: add the PLAN_SERIALIZATION_SETTINGS alias for the old serialized setting name so readers accept both names.

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jun 16, 2026
Comment thread src/Core/Settings.cpp Resolved
DECLARE(Bool, use_hash_table_stats_for_join_reordering, false, "Enable using collected hash table statistics for cardinality estimation during join reordering", 0) \
DECLARE(Bool, enable_join_fixed_hash_table_conversion, true, R"(Enable converting the hash table to a flat array for joins when the key is a single integer with a small value range)", 0) \
DECLARE(Bool, enable_join_runtime_filter_shared_fixed_hash_table, true, R"(Use the hash join's FixedHashMap as the runtime filter for the probe side, replacing the Set/BloomFilter built upstream by the runtime filter framework)", 0) \
DECLARE(Bool, join_runtime_filter_from_fixed_hash_table, true, R"(When the hash join build side was converted to a FixedHashMap (see `enable_join_fixed_hash_table_conversion`), use that hash map directly as the runtime filter.)", 0) \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QueryPlanSerializationSettings::writeChangedBinary writes changed settings by name, and BaseSettings::readBinary throws UNKNOWN_SETTING when the name is not known or aliased. After this rename, a plan serialized by a node that still writes enable_join_runtime_filter_shared_fixed_hash_table = 0 cannot be read by this code. Please use the alias form in PLAN_SERIALIZATION_SETTINGS too, mapping enable_join_runtime_filter_shared_fixed_hash_table to join_runtime_filter_from_fixed_hash_table.

@clickhouse-gh

clickhouse-gh Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 85.20% 85.20% +0.00%
Functions 92.30% 92.30% +0.00%
Branches 77.50% 77.40% -0.10%

Changed lines: Changed C/C++ lines covered by tests: 66/66 (100.00%) | Lost baseline coverage (was covered on master, now uncovered in this PR): 4 line(s) · Uncovered code

Full report · Diff report

@rschu1ze
rschu1ze added this pull request to the merge queue Jun 17, 2026
Merged via the queue into master with commit 905ae60 Jun 17, 2026
322 of 326 checks passed
@rschu1ze
rschu1ze deleted the rename-rt-filter-setting branch June 17, 2026 19:43
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jun 17, 2026
UnamedRus added a commit to UnamedRus/ClickHouse that referenced this pull request Jun 26, 2026
Resolve conflicts from upstream master rename and feature work:

- `enable_join_runtime_filter_shared_fixed_hash_table` was renamed to
  `join_runtime_filter_from_fixed_hash_table` in master (PR
  ClickHouse#107668). All references on this branch are
  updated to the new name; the obsolete `SettingsChangesHistory.cpp`
  entry for the old name is dropped.
- `Settings.cpp` and `QueryPlanSerializationSettings.cpp` keep both the
  master additions (`query_plan_max_limit_for_join_lazy_indexing`,
  `query_plan_min_columns_for_join_lazy_indexing`) and this branch's
  demote settings.
- `makeDistributed.cpp` keeps master's `validateBucketCount` /
  `MAX_DISTRIBUTED_PLAN_BUCKET_COUNT` and drops the duplicate default
  argument from the local `estimateReadRowsCount` declaration; the
  canonical declaration with the default now lives in
  `Optimizations.h`.
- `optimizeJoin.cpp` keeps the demote-side comment block explaining the
  generic row-preserving pass-through.

Also rename the demote settings for clarity that they only apply to the
hash join algorithm:
- `query_plan_join_subset_keys_auto`
  -> `query_plan_hash_join_subset_keys_auto`
- `query_plan_join_subset_keys_min_rows`
  -> `query_plan_hash_join_subset_keys_min_rows`
- `query_plan_join_subset_keys_min_kept_selectivity`
  -> `query_plan_hash_join_subset_keys_min_kept_selectivity`

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants