gabotechs commented on code in PR #23842:
URL: https://github.com/apache/datafusion/pull/23842#discussion_r3688805673
##########
datafusion/core/src/physical_planner.rs:
##########
@@ -120,162 +119,31 @@ use itertools::{Itertools, multiunzip};
use log::debug;
use tokio::sync::Mutex;
-/// Physical query planner that converts a `LogicalPlan` to an
-/// `ExecutionPlan` suitable for execution.
-#[async_trait]
-pub trait PhysicalPlanner: Send + Sync {
- /// Create a physical plan from a logical plan
- async fn create_physical_plan(
- &self,
- logical_plan: &LogicalPlan,
- session_state: &SessionState,
- ) -> Result<Arc<dyn ExecutionPlan>>;
+// Re-export from this module for backwards compatibility.
+pub use datafusion_session::{ExtensionPlanner, PhysicalPlanner};
- /// Create a physical expression from a logical expression
- /// suitable for evaluation
- ///
- /// `expr`: the expression to convert
- ///
- /// `input_dfschema`: the logical plan schema for evaluating `expr`
- ///
- /// `planning_ctx`: the [`PhysicalPlanningContext`] used to resolve
- /// `Expr::ScalarSubquery` nodes. During physical planning the planner
- /// threads the context of the plan currently being converted to a physical
- /// plan (for example into [`ExtensionPlanner::plan_extension`], which
- /// should forward it here). Callers creating physical expressions outside
- /// of a plan should pass `&PhysicalPlanningContext::default()`.
- fn create_physical_expr(
- &self,
- expr: &Expr,
- input_dfschema: &DFSchema,
- session_state: &SessionState,
- planning_ctx: &PhysicalPlanningContext,
- ) -> Result<Arc<dyn PhysicalExpr>>;
+struct SessionOptimizerContext<'a> {
+ session: &'a dyn Session,
}
Review Comment:
No action item here
--
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]