Skip to content

Don't Force Normal Projection Optimization to Have Filter#104680

Merged
Michicosun merged 5 commits into
masterfrom
do_not_force_projection_usage_to_have_filter
May 12, 2026
Merged

Don't Force Normal Projection Optimization to Have Filter#104680
Michicosun merged 5 commits into
masterfrom
do_not_force_projection_usage_to_have_filter

Conversation

@Michicosun
Copy link
Copy Markdown
Member

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):

This patch changes when optimizeUseNormalProjections can be used and allows a specific case where nothing was filtered, but the projection's sorting key can help remove the sorting step of a query.

@Michicosun Michicosun changed the title Do't Force Normal Projection Optimization to Have Filter Don't Force Normal Projection Optimization to Have Filter May 12, 2026
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh Bot commented May 12, 2026

Workflow [PR], commit [0524f16]

Summary:


AI Review

Summary

This PR relaxes optimizeUseNormalProjections so normal projections can be considered when a query has no filter but has an outer ORDER BY that may benefit from read-in-order, and it adds a stateless regression test for that path. I did not find unresolved correctness, safety, or evidence gaps in the current diff.

Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label May 12, 2026
@yariks5s yariks5s self-assigned this May 12, 2026
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh Bot commented May 12, 2026

LLVM Coverage Report

Metric Baseline Current Δ
Lines 84.10% 84.10% +0.00%
Functions 91.10% 91.10% +0.00%
Branches 76.50% 76.50% +0.00%

Changed lines: 100.00% (12/12) · Uncovered code

Full report · Diff report

@Michicosun Michicosun enabled auto-merge May 12, 2026 18:16
@Michicosun Michicosun added this pull request to the merge queue May 12, 2026
Merged via the queue into master with commit 12f07ad May 12, 2026
165 checks passed
@Michicosun Michicosun deleted the do_not_force_projection_usage_to_have_filter branch May 12, 2026 19:06
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label May 12, 2026
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.

3 participants