Apache DataFusion SQL Query Engine
Move PhysicalPlanner to `physical_planer` module (#6570)
Andrew Lambb7cd7bae916c
diff --git a/datafusion/core/src/execution/context.rs b/datafusion/core/src/execution/context.rsindex 5dc8a97544..f9f4a11d10 100644--- a/datafusion/core/src/execution/context.rs+++ b/datafusion/core/src/execution/context.rs@@ -77,11 +77,11 @@ use sqlparser::dialect::dialect_from_str;use crate::config::ConfigOptions;use crate::datasource::physical_plan::{plan_to_csv, plan_to_json, plan_to_parquet};use crate::execution::{runtime_env::RuntimeEnv, FunctionRegistry};-use crate::physical_plan::planner::DefaultPhysicalPlanner;use crate::physical_plan::udaf::AggregateUDF;use crate::physical_plan::udf::ScalarUDF;use crate::physical_plan::ExecutionPlan;-use crate::physical_plan::PhysicalPlanner;+use crate::physical_planner::DefaultPhysicalPlanner;+use crate::physical_planner::PhysicalPlanner;use crate::variable::{VarProvider, VarType};use async_trait::async_trait;use chrono::{DateTime, Utc};diff --git a/datafusion/core/src/lib.rs b/datafusion/core/src/lib.rsindex a08e42f85b..8d090b0862 100644--- a/datafusion/core/src/lib.rs+++ b/datafusion/core/src/lib.rs@@ -404,7 +404,7 @@//! [`AnalyzerRule`]: datafusion_optimizer::analyzer::AnalyzerRule//! [`OptimizerRule`]: optimizer::optimizer::OptimizerRule//! [`ExecutionPlan`]: physical_plan::ExecutionPlan-//! [`PhysicalPlanner`]: physical_plan::PhysicalPlanner+//! [`PhysicalPlanner`]: physical_planner::PhysicalPlanner//! [`PhysicalOptimizerRule`]: datafusion::physical_optimizer::optimizer::PhysicalOptimizerRule//! [`Schema`]: arrow::datatypes::Schema//! [`PhysicalExpr`]: physical_plan::PhysicalExpr@@ -426,6 +426,7 @@ pub mod error;pub mod execution;pub mod physical_optimizer;pub mod physical_plan;+pub mod physical_planner;pub mod prelude;pub mod scalar;pub mod variable;diff --git a/datafusion/core/src/physical_plan/mod.rs b/datafusion/core/src/physical_plan/mod.rsindex 13a1888508..11385d994b 100644--- a/datafusion/core/src/physical_plan/mod.rs+++ b/datafusion/core/src/physical_plan/mod.rs@@ -88,9 +88,6 @@ impl Stream for EmptyRecordBatchStream {}}-/// Physical planner interface-pub use self::planner::PhysicalPlanner;-/// `ExecutionPlan` represent nodes in the DataFusion Physical Plan.////// Each `ExecutionPlan` is partition-aware and is responsible for@@ -686,7 +683,6 @@ pub mod joins;pub mod limit;pub mod memory;pub mod metrics;-pub mod planner;pub mod projection;pub mod repartition;pub mod sorts;diff --git a/datafusion/core/src/physical_plan/planner.rs b/datafusion/core/src/physical_planner.rssimilarity index 99%rename from datafusion/core/src/physical_plan/planner.rsrename to datafusion/core/src/physical_planner.rsindex 5fb77f75c1..3cb6efc654 100644--- a/datafusion/core/src/physical_plan/planner.rs+++ b/datafusion/core/src/physical_planner.rs@@ -15,14 +15,8 @@// specific language governing permissions and limitations// under the License.-//! Physical query planner+//! Planner for [`LogicalPlan`] to [`ExecutionPlan`]-use super::analyze::AnalyzeExec;-use super::unnest::UnnestExec;-use super::{- aggregates, empty::EmptyExec, joins::PartitionMode, udaf, union::UnionExec,- values::ValuesExec, windows,-};use crate::datasource::source_as_provider;use crate::execution::context::{ExecutionProps, SessionState};use crate::logical_expr::utils::generate_sort_key;@@ -40,6 +34,7 @@ use crate::logical_expr::{Limit, Values};use crate::physical_expr::create_physical_expr;use crate::physical_optimizer::optimizer::PhysicalOptimizerRule;use crate::physical_plan::aggregates::{AggregateExec, AggregateMode, PhysicalGroupBy};+use crate::physical_plan::analyze::AnalyzeExec;use crate::physical_plan::explain::ExplainExec;use crate::physical_plan::expressions::{Column, PhysicalSortExpr};use crate::physical_plan::filter::FilterExec;@@ -50,9 +45,14 @@ use crate::physical_plan::limit::{GlobalLimitExec, LocalLimitExec};use crate::physical_plan::projection::ProjectionExec;use crate::physical_plan::repartition::RepartitionExec;use crate::physical_plan::sorts::sort::SortExec;+use crate::physical_plan::unnest::UnnestExec;use crate::physical_plan::windows::{BoundedWindowAggExec, PartitionSearchMode, WindowAggExec,};+use crate::physical_plan::{+ aggregates, empty::EmptyExec, joins::PartitionMode, udaf, union::UnionExec,+ values::ValuesExec, windows,+};use crate::physical_plan::{joins::utils as join_utils, Partitioning};use crate::physical_plan::{AggregateExpr, ExecutionPlan, PhysicalExpr, WindowExpr};use crate::{@@ -1932,8 +1932,9 @@ mod tests {use crate::datasource::MemTable;use crate::physical_plan::SendableRecordBatchStream;use crate::physical_plan::{- expressions, DisplayFormatType, Partitioning, PhysicalPlanner, Statistics,+ expressions, DisplayFormatType, Partitioning, Statistics,};+ use crate::physical_planner::PhysicalPlanner;use crate::prelude::{SessionConfig, SessionContext};use crate::scalar::ScalarValue;use crate::test_util::{scan_empty, scan_empty_with_partitions};diff --git a/datafusion/core/tests/user_defined_plan.rs b/datafusion/core/tests/user_defined_plan.rsindex 7738a12394..c237d8e632 100644--- a/datafusion/core/tests/user_defined_plan.rs+++ b/datafusion/core/tests/user_defined_plan.rs@@ -80,11 +80,10 @@ use datafusion::{},optimizer::{optimize_children, OptimizerConfig, OptimizerRule},physical_plan::{- expressions::PhysicalSortExpr,- planner::{DefaultPhysicalPlanner, ExtensionPlanner},- DisplayFormatType, Distribution, ExecutionPlan, Partitioning, PhysicalPlanner,- RecordBatchStream, SendableRecordBatchStream, Statistics,+ expressions::PhysicalSortExpr, DisplayFormatType, Distribution, ExecutionPlan,+ Partitioning, RecordBatchStream, SendableRecordBatchStream, Statistics,},+ physical_planner::{DefaultPhysicalPlanner, ExtensionPlanner, PhysicalPlanner},prelude::{SessionConfig, SessionContext},};