Skip to content

Commit

Permalink
Move PhysicalPlanner to physical_planer module
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Jun 6, 2023
1 parent 39ee59a commit 3d73f4c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 19 deletions.
4 changes: 2 additions & 2 deletions datafusion/core/src/execution/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ use crate::config::ConfigOptions;
use crate::execution::{runtime_env::RuntimeEnv, FunctionRegistry};
use crate::physical_optimizer::dist_enforcement::EnforceDistribution;
use crate::physical_plan::file_format::{plan_to_csv, plan_to_json, plan_to_parquet};
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};
Expand Down
3 changes: 2 additions & 1 deletion datafusion/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,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
Expand All @@ -420,6 +420,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;
Expand Down
4 changes: 0 additions & 4 deletions datafusion/core/src/physical_plan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -687,7 +684,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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -38,6 +32,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;
Expand All @@ -48,9 +43,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::{
Expand Down Expand Up @@ -1931,8 +1931,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};
Expand Down
7 changes: 3 additions & 4 deletions datafusion/core/tests/user_defined_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
};

Expand Down

0 comments on commit 3d73f4c

Please sign in to comment.