25.8.15 Backport of #87303 - Fix condition not being moved to PREWHERE in case there is a row policy (version 2)#1345
Conversation
Backport ClickHouse#87303 to 25.9: Fix condition not being moved to PREWHERE in case there is a row policy (version 2)
…llow-up Follow up to ClickHouse#87303
|
S3 fails: Altinity/clickhouse-regression#93 Aggregate fails: |
QA VerificationAnalysis SummaryThis PR is a backport of upstream ClickHouse#87303 (with follow-ups ClickHouse#88017 and ClickHouse#88036) to the Bug Fixed:The move-to-PREWHERE optimization did not work when row policies were present, causing performance degradation. This fix restructures how row-level filtering interacts with New Tests:
Verification Criteria:
* Remaining Failures
Notes:
No manual testing required - upstream validation, follow-up fixes, and CI coverage are sufficient for this backport. |
Changelog category (leave one):
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:
Regression jobs to run: