Skip to content

Conversation

@mkmkme
Copy link
Collaborator

@mkmkme mkmkme commented Nov 7, 2025

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

Additionally, the test from ClickHouse#88036 was added.
Also 02679_explain_merge_tree_prewhere_row_policy was fixed as per 0aed477

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.
Also `02679_explain_merge_tree_prewhere_row_policy` was fixed as per
0aed477
@mkmkme mkmkme added backport Backport 25.3 25.3.8 25.3.8 Altinity Stable labels Nov 7, 2025
added = added || restoreDAGInputs(row_level_filter->actions, inputs);

added = added || restoreDAGInputs(info.prewhere_actions, inputs);
added = added || restoreDAGInputs(info->prewhere_actions, inputs);
Copy link
Collaborator

Choose a reason for hiding this comment

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

if (info)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, great catch!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Collaborator

@ilejn ilejn left a comment

Choose a reason for hiding this comment

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

LGTM except minor issue I've commented

Copy link
Collaborator

@zvonand zvonand left a comment

Choose a reason for hiding this comment

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

Test fails look suspicious. i.e. 02679_explain_merge_tree_prewhere_row_policy. Re-run did not help.

https://s3.amazonaws.com/altinity-build-artifacts/1129/b688a7b1caafd76bd3eabe45596325b1cccea339/stateless_tests__debug__[2_2].html

@mkmkme
Copy link
Collaborator Author

mkmkme commented Nov 10, 2025

Test fails look suspicious. i.e. 02679_explain_merge_tree_prewhere_row_policy. Re-run did not help.

https://s3.amazonaws.com/altinity-build-artifacts/1129/b688a7b1caafd76bd3eabe45596325b1cccea339/stateless_tests__debug__[2_2].html

It seems I've forgotten to include the change to the test. We did change the reference in 24.8 to reflect this change. I'll fix it, thanks!

@zvonand zvonand merged commit 9979b3d into releases/25.3.8 Nov 10, 2025
281 of 285 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

25.3 25.3.8 25.3.8 Altinity Stable backport Backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants