-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Avoid reusing columns among different named tuples #70103
Conversation
This is an automated comment for commit e843bb9 with description of existing statuses. It's updated for the latest CI running ✅ Click here to open a full report in a separate page Successful checks
|
if (const DataTypeTuple * type_tuple = typeid_cast<const DataTypeTuple *>(function_node.getResultType().get())) | ||
{ | ||
if (type_tuple->haveExplicitNames()) |
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.
This will likely not work in the distributed case because the query on the follower node won't have AS col_a
and AS col_b
for the tuple
function argument. I think a proper fix would also include creating a cast operation.
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.
Also, I think that such code should check enable_named_columns_in_function_tuple
setting.
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.
This will likely not work in the distributed case because the query on the follower node won't have
AS col_a
andAS col_b
for thetuple
function argument. I think a proper fix would also include creating a cast operation.
It works because we do addConvertingActions
in ReadFromRemote step. I've added a test case to verify this.
Also, I think that such code should check enable_named_columns_in_function_tuple setting.
Sure.
571ba76
to
d5359cd
Compare
{ | ||
if (i != 0) | ||
s << ", "; | ||
s << names[i]; |
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.
Missing escaping.
A case that's not covered by this fix:
I'm going to disable with setting by default (and backport) in the meantime. |
We never support inserting |
…0cf1c8f242c3fe583d6add0a86718 Cherry pick #70103 to 24.9: Avoid reusing columns among different named tuples
Backport #70103 to 24.9: Avoid reusing columns among different named tuples
…0cf1c8f242c3fe583d6add0a86718 Cherry pick #70103 to 24.7: Avoid reusing columns among different named tuples
…0cf1c8f242c3fe583d6add0a86718 Cherry pick #70103 to 24.8: Avoid reusing columns among different named tuples
Just for reference: Setting |
@amosbird, please enable it back in a subsequent pull request. |
@alexey-milovidov Sure. I'll mention this backward incompatibility in the following PR #70103 (comment) |
Backport #70103 to 24.8: Avoid reusing columns among different named tuples
Backport #70103 to 24.7: Avoid reusing columns among different named tuples
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Avoid reusing columns among different named tuples when evaluating
tuple
functions. This fixes #70022Documentation entry for user-facing changes
CI Settings (Only check the boxes if you know what you are doing):