New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not apply projection if read-in-order was enabled. #50923
Conversation
This is an automated comment for commit ab6ac6b with description of existing statuses. It's updated for the latest CI running
|
Backport #50923 to 23.5: Do not apply projection if read-in-order was enabled.
Backport #50923 to 23.4: Do not apply projection if read-in-order was enabled.
Backport #50923 to 23.3: Do not apply projection if read-in-order was enabled.
@@ -38,6 +38,9 @@ bool canUseProjectionForReadingStep(ReadFromMergeTree * reading) | |||
if (reading->isParallelReadingEnabled()) | |||
return false; | |||
|
|||
if (reading->readsInOrder()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KochetovNicolai sometimes projections can be beneficial, even when read-in-order is possible. Of course to make the right choice there should be some statistics, but for now, if the user created such a projection maybe it is better to assume that he/she knew what he/she is doing and it will be better to disable in-order read for such case instead of disabling projections. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly this issue #58912
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix possible crash if projection optimization was applied after read-in-order.