-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Derive Clone
for more ExecutionPlans
#13202
Comments
IMO the right answer in all cases is full destructuring and direct creation, without any shortcuts (like When a plan node gains new field, it's impossible to judge apriori about all callsites using this plan node. Does the logic still hold with this new field being added? Does it need to change? |
I basically agree with this assesment -- and that is in my mind what a Given the fact that we almost always have |
I thought it's an option to destruct taking fields by reference (like in |
That is true but it won't help modifying the field 🤔 |
Oh see your point. Destruct by reference, compute new value for a field and then you want to construct new instance. You need shallow clone of all other fields. 👍 |
Closed in #13203 |
Is your feature request related to a problem or challenge?
In our code / optimizers we have a lot of code that looks like this when we are
trying to rewrite a SortExec node by making a copy and changing only some of the
fields. For example:
This is problematic and we have had bugs in the past when SortExec got a new field (like
fetch
)We would like to simply be able to make a copy and modify appropriately:
Many ExecutionPlans like
ParquetExec
already implementClone
so it is nice tomake the rest consistent
Describe the solution you'd like
I would like to derive
Clone
for other plansDescribe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: