timsaucer opened a new pull request, #23842:
URL: https://github.com/apache/datafusion/pull/23842

   ## Which issue does this PR close?
   
   - Addresses a portion of https://github.com/apache/datafusion/issues/23678 
   - Follow on to https://github.com/apache/datafusion/pull/23703
   
   ## Rationale for this change
   
   This PR unlocks using a query planner across the FFI boundary.
   
   ## What changes are included in this PR?
   
   Moves these traits to the `datafusion-session` crate:
   
   - `QueryPlanner`
   - `PhysicalPlanner`
   - `ExtensionPlanner`
   - `PhysicalOptimizerRule`
   - `PhysicalOptimizerContext`
   
   Additionally changed the method signatures from taking `&SessionState` to 
`&dyn Session`.
   
   Adds these methods on `Session` trait:
   
   - `fn query_planner(&self) -> Arc<dyn QueryPlanner + Send + Sync>`
   - `fn optimize(&self, plan: &LogicalPlan) -> Result<LogicalPlan>`
   - `fn physical_optimizers(&self) -> &[Arc<dyn PhysicalOptimizerRule + Send + 
Sync>]`
   - `fn statistics_registry(&self) -> Option<&StatisticsRegistry>`
   
   ## Are these changes tested?
   
   Unit tests are added for the new methods.
   
   ## Are there any user-facing changes?
   
   Yes, users must implement new methods for `query_planner` for their custom 
`Session`. This is not expected to impact many users, since it is most common 
to use the existing `SessionState`.


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

Reply via email to