Skip to content

Refactor runtime filter build options - #121597

Merged
alexey-milovidov merged 1 commit into
masterfrom
runtimefilter-buildoptions
Sep 23, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
runtimefilter-buildoptions

Conversation

@cv4g

@cv4g cv4g commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Another prep PR for #96779:

Changes:

  • Added RuntimeFilterBuildOptions and RuntimeFilterPolarity.
  • Threaded build options and existing RuntimeFilterConfig through the step/transform APIs.
  • Preserved existing behavior

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Not for changelog.


Workflow [PR]
Sync PR [sync-upstream/pr/121597]

Version info

  • Merged into: 26.10.1.493-master (included in 26.10 and later)

@clickhouse-gh

clickhouse-gh Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [f6d52e7]

Summary: ✅


AI Review

Summary

This PR refactors runtime-filter build parameters into RuntimeFilterBuildOptions and RuntimeFilterPolarity, then threads that bundle through BuildRuntimeFilterStep and BuildRuntimeFilterTransform. I did not find a correctness or compatibility regression in the current code: the serialized form is still effectively the same, the Contains vs NotContains split preserves the old allow_to_use_not_exact_filter behavior, and the deserialized-step contract remains intentionally inert. The existing runtime-filter coverage also already exercises the risky semantics this refactor touches, including negative filters, index-analysis gating, and worker-side runtime-filter rebuilding after plan shipment.

Missing context / blind spots
  • ⚠️ Build (arm_tidy) and the Praktika PR report were still pending when I reviewed this. A green result there would close the remaining cross-architecture and wider-integration gap.
Final Verdict

✅ No review findings.

LLVM Coverage Report

Measured on commit f6d52e7.

Metric Baseline Current Δ
Lines 88.10% 88.10% +0.00%
Functions 91.70% 91.70% +0.00%
Branches 79.30% 79.40% +0.10%

Changed lines: Changed C/C++ lines covered: 118/118 (100.00%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Sep 22, 2026
const UInt64 bloom_filter_hash_functions = ctx.settings[QueryPlanSerializationSetting::join_runtime_bloom_filter_hash_functions];
const Float64 pass_ratio_threshold_for_disabling = ctx.settings[QueryPlanSerializationSetting::join_runtime_filter_pass_ratio_threshold_for_disabling];
const Float64 blocks_to_skip_before_reenabling = static_cast<Float64>(ctx.settings[QueryPlanSerializationSetting::join_runtime_filter_blocks_to_skip_before_reenabling]);
const UInt64 blocks_to_skip_before_reenabling = ctx.settings[QueryPlanSerializationSetting::join_runtime_filter_blocks_to_skip_before_reenabling];

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Data type fix

NotContains,
};

}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

#96779 adds another declaration to the file, so it won't remain singular here

@clickhouse-gh

clickhouse-gh Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing f6d52e79f with master 88eed4237 (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Compile time of recompiled translation units

19 translation units recompiled, 120 s compile time in total, 19 of them have a recent master baseline.

Median compile-time ratio to the baselines is ×1.08 (machine-speed difference or a change affecting every TU); per-TU deltas below are relative to that ratio.
The matched translation units cost +8.1 s (+7%) in total before that adjustment.

Job report

@clickhouse-gh clickhouse-gh Bot added the comp-joins JOINs end-to-end (planning hooks + runtime join operators/algorithms). Single bucket to avoid pla... label Sep 22, 2026
@alexey-milovidov alexey-milovidov self-assigned this Sep 23, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Sep 23, 2026
Merged via the queue into master with commit b1224b8 Sep 23, 2026
348 of 350 checks passed
@alexey-milovidov
alexey-milovidov deleted the runtimefilter-buildoptions branch September 23, 2026 05:28
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-joins JOINs end-to-end (planning hooks + runtime join operators/algorithms). Single bucket to avoid pla... 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.

3 participants