PR: fix inconsistent reading mode with read-in-order optimizations#80652
Merged
devcrafter merged 40 commits intomasterfrom Jun 18, 2025
Merged
PR: fix inconsistent reading mode with read-in-order optimizations#80652devcrafter merged 40 commits intomasterfrom
devcrafter merged 40 commits intomasterfrom
Conversation
Contributor
Comment on lines
+712
to
+719
| if (!blocksHaveEqualStructure(header, plan_header)) | ||
| { | ||
| auto converting_dag = ActionsDAG::makeConvertingActions( | ||
| plan_header.getColumnsWithTypeAndName(), header.getColumnsWithTypeAndName(), ActionsDAG::MatchColumnsMode::Name); | ||
|
|
||
| auto expression = std::make_unique<ExpressionStep>(plan_header, std::move(converting_dag)); | ||
| plan->addStep(std::move(expression)); | ||
| } |
Member
There was a problem hiding this comment.
Looks a bit specific to ReadFromLocalParallelReplicaStep.
Another option is to add ExpressionStep to query plan (if needed), and only then call replaceNode
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #75961
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
For some queries executed with parallel replicas, reading in order optimization(s) could be applied on initiator while can't be applied on remote nodes. It leads to different reading modes used by parallel replicas coordinator (on initiator) and on remoted nodes, which is a logical error