-
Notifications
You must be signed in to change notification settings - Fork 1.8k
minor: avoid cloning the SetExpr during planning of SelectInto
#10152
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
Conversation
| if let Some(with) = query.with { | ||
| self.plan_with_clause(with, planner_context)?; | ||
| } | ||
| let plan = self.set_expr_to_plan(*(set_expr.clone()), planner_context)?; |
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.
The removed clone is here.
comphead
left a comment
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.
lgtm, thanks @jonahgao
| _ => None, | ||
| }; | ||
|
|
||
| let plan = self.set_expr_to_plan(*set_expr, planner_context)?; |
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.
I've checked and the select.into field isn't used in this function, so should be good.
Though, I wonder if it might be a concern that we take the into before passing into this function, in case for some future use case it might also need the into? 🤔
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.
We can just clone the select.into if needed in the future. Currently, I think INTO is more like an independent planning unit, it is only connected with the input plan through data.
Jefffrey
left a comment
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.
👍
…pache#10152) * minor: avoid cloning the `SetExpr` during planning of `SelectInto` * retry ci
Which issue does this PR close?
N/A.
Rationale for this change
When planning
Into, we don't need to keep a copy of the wholeSetExpr, we just need to take away the necessarySelectInto.What changes are included in this PR?
Are these changes tested?
Yes. By existing tests.
Are there any user-facing changes?
No