joroKr21 commented on PR #17675: URL: https://github.com/apache/datafusion/pull/17675#issuecomment-3342677159
> I think the changes to avoid Schema clones will help , though I just double checked and a Schema is mostly an empty HashMap and an Arc (Fields) so clone'ing isn't that expensive. That's a good point, I didn't look into it. I'm open to reverting the changes in the logical plan builder from `SchemaRef` back to `&Schema` to reduce breaking changes but I wouldn't change `logical2physical`. > Also, I didn't find many places in the code by inspection where we saved a deep clone of a LogicalPlan -- did I miss any that you know of? I don't think there's any deep cloning - after all the `LogicalPlan` children are also `Arc`s. But I also don't see much of a downside if we use `impl Into<Arc<LogicalPlan>>` since it allows using either one. > If we are going to change the APIs around and disrupt downstream users, I think they should get something from it, in this case better planning performance. I guess that really depends on how much we use the logical plan builder internally. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
