timsaucer commented on code in PR #23842:
URL: https://github.com/apache/datafusion/pull/23842#discussion_r3639609385
##########
datafusion/session/src/session.rs:
##########
@@ -89,6 +92,30 @@ pub trait Session: Send + Sync {
self.config().options()
}
+ /// Return the query planner for this session.
+ fn query_planner(&self) -> Arc<dyn QueryPlanner + Send + Sync>;
+
+ /// Optimize a logical plan.
+ ///
+ /// The default implementation returns the plan unchanged. Sessions that
use
+ /// the default query planning implementation should override this method.
+ fn optimize(&self, plan: &LogicalPlan) -> Result<LogicalPlan> {
+ Ok(plan.clone())
+ }
+
+ /// Return the physical optimizer rules for this session.
+ ///
+ /// The default implementation returns no rules. Sessions that use the
+ /// default physical planner should override this method.
+ fn physical_optimizers(&self) -> &[Arc<dyn PhysicalOptimizerRule + Send +
Sync>] {
+ &[]
+ }
+
+ /// Return the optional statistics registry used during physical
optimization.
+ fn statistics_registry(&self) -> Option<&StatisticsRegistry> {
+ None
+ }
Review Comment:
These are the new methods hoisted up to `Session` from `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]