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: [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]