tschwarzinger opened a new pull request, #24560: URL: https://github.com/apache/datafusion/pull/24560
## Which issue does this PR close? - Closes #20495. The solution I came up with is a bit different to the one discussed in the issue. Instead of avoiding cloning `SessionState` we just make it cheap to clone it by wrapping most of the state in an `Arc`. Cloning is only necessary when mutating the inner session state, if we're not the sole reference (`Arc::make_mut` as dicussed in the issue). I initially tried to wrap the entire `SessionState` in an Arc but we still need copying if we're not the only reference, as `execution_props` are changed for each query. ## Rationale for this change Improve planner performance. See (https://github.com/apache/datafusion/issues/20495) ## What changes are included in this PR? - Extract `SessionStateInner` out of the session state and share it behind an `Arc<SessionStateInner>` ## Are these changes tested? Yes with existing tests ## Are there any user-facing changes? No, except faster performance -- 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]
