Skip to content

Backport #99084 to 26.1: Try not to re-caclculate indexes in requestReadingInOrder#99187

Merged
vdimir merged 1 commit into26.1from
backport/26.1/99084
Mar 11, 2026
Merged

Backport #99084 to 26.1: Try not to re-caclculate indexes in requestReadingInOrder#99187
vdimir merged 1 commit into26.1from
backport/26.1/99084

Conversation

@robot-ch-test-poll2
Copy link
Contributor

@robot-ch-test-poll2 robot-ch-test-poll2 commented Mar 10, 2026

Original pull-request #99084
Cherry-pick pull-request #99186

This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.

The PR source

The PR is created in the CI job


Note

Medium Risk
Touches MergeTree read planning for the read-in-order optimization; while the change is small, incorrect read_type propagation could affect ordering/aggregation behavior in some query plans.

Overview
Avoids re-running selectRangesToRead() when ReadFromMergeTree::requestReadingInOrder() enables the in-order optimization. Instead, if an existing analyzed_result_ptr is present (and not reading from a projection), it now just updates analyzed_result_ptr->read_type based on the requested sort direction (InOrder vs InReverseOrder).

Written by Cursor Bugbot for commit e914a90. This will update automatically on new commits. Configure here.

@robot-ch-test-poll2 robot-ch-test-poll2 added pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-bugfix Pull request with bugfix, not backported by default labels Mar 10, 2026
@clickhouse-gh
Copy link
Contributor

clickhouse-gh bot commented Mar 10, 2026

Workflow [BackportPR], commit [e914a90]

Summary:

job_name test_name status info comment
Stress test (amd_tsan) failure
Logical error: Block structure mismatch in A stream: different number of columns: (STID: 0993-2da1) FAIL cidb

@vdimir vdimir merged commit 3921264 into 26.1 Mar 11, 2026
33 of 36 checks passed
@vdimir vdimir deleted the backport/26.1/99084 branch March 11, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants