You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "gabotechs (via GitHub)" <gi...@apache.org> on 2026/07/09 11:56:09 UTC
Re: [PR] Do not clone `SessionState` in `QueryPlanner` [datafusion]
gabotechs commented on code in PR #23418:
URL: https://github.com/apache/datafusion/pull/23418#discussion_r3551348502
##########
datafusion/core/src/physical_planner.rs:
##########
@@ -269,8 +270,17 @@ impl PhysicalPlanner for DefaultPhysicalPlanner {
async fn create_physical_plan(
&self,
logical_plan: &LogicalPlan,
- session_state: &SessionState,
+ session_state: &dyn Session,
) -> Result<Arc<dyn ExecutionPlan>> {
+ let session_state = session_state
+ .as_any()
+ .downcast_ref::<SessionState>()
+ .ok_or_else(|| {
+ plan_datafusion_err!(
+ "DefaultPhysicalPlanner requires a SessionState for physical optimization"
+ )
+ })?;
+
Review Comment:
Just put this here so that things compile, but `&dyn Session` should be threaded all the way.
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org