Skip to content

Conversation

@mkmkme
Copy link
Collaborator

@mkmkme mkmkme commented Oct 15, 2025

This commit is a manual backport of two PRs:

  1. Fix condition not being moved to PREWHERE in case there is a row policy (version 2) ClickHouse/ClickHouse#87303
  2. Follow up to #87303 ClickHouse/ClickHouse#88017

Additionally, the test from ClickHouse#88036 was added.

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

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

Fixed move-to-prewhere optimization, which did not work in the presence of row policy (ClickHouse#87303 by @KochetovNicolai)

CI/CD Options

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Performance tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All with Aarch64
  • All Regression
  • Disable CI Cache

Regression jobs to run:

  • Fast suites (mostly <1h)
  • Aggregate Functions (2h)
  • Alter (1.5h)
  • Benchmark (30m)
  • ClickHouse Keeper (1h)
  • Iceberg (2h)
  • LDAP (1h)
  • Parquet (1.5h)
  • RBAC (1.5h)
  • SSL Server (1h)
  • S3 (2h)
  • Tiered Storage (2h)

This commit is a manual backport of two PRs:
  1. ClickHouse#87303
  2. ClickHouse#88017

Additionally, the test from ClickHouse#88036
was added.
@altinity-robot
Copy link
Collaborator

altinity-robot commented Oct 15, 2025

This is an automated comment for commit 0aed477 with description of existing statuses. It's updated for the latest CI running

❌ Click here to open a full report in a separate page

Check nameDescriptionStatus
Grype Scan altinityinfra/clickhouse-keeper:1080-24.8.14.10522.altinitytestThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS❌ failure
Integration testsThe integration tests report. In parenthesis the package type is given, and in square brackets are the optional part/total tests❌ failure
Sign aarch64There's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS❌ error
Sign releaseThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS❌ error
Stateful testsRuns stateful functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc❌ error
Successful checks
Check nameDescriptionStatus
AST fuzzerRuns randomly generated queries to catch program errors. The build type is optionally given in parenthesis. If it fails, ask a maintainer for help✅ success
BuildsThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
Compatibility checkChecks that clickhouse binary runs on distributions with old libc versions. If it fails, ask a maintainer for help✅ success
Docker keeper imageThe check to build and optionally push the mentioned image to docker hub✅ success
Docker server imageThe check to build and optionally push the mentioned image to docker hub✅ success
Grype Scan altinityinfra/clickhouse-server:1080-24.8.14.10522.altinitytest-alpineThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
Grype Scan altinityinfra/clickhouse-server:1080-24.8.14.10522.altinitytestThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
Install packagesChecks that the built packages are installable in a clear environment✅ success
Ready for releaseThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
Stateless testsRuns stateless functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc✅ success
Stress testRuns stateless functional tests concurrently from several clients to detect concurrency-related errors✅ success

@ianton-ru
Copy link

ianton-ru commented Oct 15, 2025

Guess that failed test 02679_explain_merge_tree_prewhere_row_policy is related to changes, need to fix it too.

Am I right that ClickHouse#8730 has some changes for some post-24.8 stuff, which are safely removed from PR (like FormatFactory, etc)?

@mkmkme
Copy link
Collaborator Author

mkmkme commented Oct 15, 2025

Thanks for the review!

Guess that failed test 02679_explain_merge_tree_prewhere_row_policy is related to changes, need to fix it too.

Fixed in a follow-up commit.

Am I right that ClickHouse#8730 has some changes for some post-24.8 stuff, which are safely removed from PR (like FormatFactory, etc)?

Yes, it had quite a bit of stuff that was missing in this version, and that's why I decided to apply it manually. The extra stuff was safely removed, but I wanted to have more eyes looking into this code to spot a possible mistake.

Copy link

@ianton-ru ianton-ru left a comment

Choose a reason for hiding this comment

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

LGTM

@zvonand zvonand merged commit 90cb6cf into customizations/24.8.14 Oct 16, 2025
175 of 196 checks passed
@mkmkme mkmkme deleted the backport/24.8.14/87303 branch October 16, 2025 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants