Skip to content

Backport #98514 to 26.1: Fix unexpected result with read_in_order_use_virtual_row #98928

Merged
clickhouse-gh[bot] merged 1 commit into26.1from
backport/26.1/98514
Mar 6, 2026
Merged

Backport #98514 to 26.1: Fix unexpected result with read_in_order_use_virtual_row #98928
clickhouse-gh[bot] merged 1 commit into26.1from
backport/26.1/98514

Conversation

@robot-ch-test-poll1
Copy link
Copy Markdown
Contributor

@robot-ch-test-poll1 robot-ch-test-poll1 commented Mar 6, 2026

Original pull-request #98514
Cherry-pick pull-request #98927

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 read-in-order/virtual-row query plan optimization, which can affect result ordering/correctness in JOIN+ORDER BY queries. Change is small but in a correctness-sensitive optimizer path.

Overview
Fixes virtual-row conversion generation for read_in_order_use_virtual_row by preserving the original ActionsDAG function node result_name when rebuilding monotonic expression chains (instead of auto-generating a new name).

Adds a stateless regression test (04001_virtual_row_conversions_join_column_names) covering ORDER BY on a casted low-cardinality key and JOIN conditions using Nullable subcolumns, including a full_sorting_merge join variant, to ensure stable/expected results.

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

@robot-ch-test-poll1 robot-ch-test-poll1 added pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-critical-bugfix labels Mar 6, 2026
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Mar 6, 2026

Workflow [BackportPR], commit [ad23ffc]

Summary:

@clickhouse-gh clickhouse-gh bot merged commit 63ecb87 into 26.1 Mar 6, 2026
34 of 35 checks passed
@clickhouse-gh clickhouse-gh bot deleted the backport/26.1/98514 branch March 6, 2026 15:30
@clickhouse-gh clickhouse-gh bot added the ready-for-backport PR is eligible for backporting (merged 7+ days ago, not reverted) label Mar 27, 2026
@maxknv maxknv removed the ready-for-backport PR is eligible for backporting (merged 7+ days ago, not reverted) label Mar 27, 2026
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-critical-bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants