waynexia opened a new issue, #11715: URL: https://github.com/apache/datafusion/issues/11715
### Is your feature request related to a problem or challenge? The planning phase generates and optimizes both logical and physical plans. IIRC we only provide one method to "optimize and create" a physical plan: https://github.com/apache/datafusion/blob/a721be1b1d863b5b15a7a945c37ec051c449c46f/datafusion/core/src/execution/session_state.rs#L715-L723 ### Describe the solution you'd like There are two approaches to alleviate this: - Expose more methods that each one only does one step, like `create_logical_plan`, `analyze_logical_plan`, `optimize_logical_plan`, `create_physical_plan` and `optimize_physical_plan` etc. - Expose those components to users, like ```rust /// Returns the [`Analyzer`] for this session pub fn analyzer(&self) -> &Analyzer { &self.analyzer } /// Returns the [`Optimizer`] for this session pub fn optimizer(&self) -> &Optimizer { &self.optimizer } /// Returns the [`QueryPlanner`] for this session pub fn query_planner(&self) -> &Arc<dyn QueryPlanner + Send + Sync> { &self.query_planner } ``` ### Describe alternatives you've considered _No response_ ### Additional context _No response_ -- 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]
