Skip to content

Commit

Permalink
Create datafusion-physical-optimizer crate (apache#11507)
Browse files Browse the repository at this point in the history
* Create datafusion-physical-optimizer crate

* fmt .md

* Update Cargo.lock in datafusion-cli

* fmt toml and fix doc
  • Loading branch information
lewiszlw authored and Lordworms committed Jul 23, 2024
1 parent 6ec3094 commit 7992af9
Show file tree
Hide file tree
Showing 24 changed files with 202 additions and 86 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ members = [
"datafusion/optimizer",
"datafusion/physical-expr-common",
"datafusion/physical-expr",
"datafusion/physical-optimizer",
"datafusion/physical-plan",
"datafusion/proto",
"datafusion/proto/gen",
Expand Down Expand Up @@ -97,6 +98,7 @@ datafusion-functions-array = { path = "datafusion/functions-array", version = "4
datafusion-optimizer = { path = "datafusion/optimizer", version = "40.0.0", default-features = false }
datafusion-physical-expr = { path = "datafusion/physical-expr", version = "40.0.0", default-features = false }
datafusion-physical-expr-common = { path = "datafusion/physical-expr-common", version = "40.0.0", default-features = false }
datafusion-physical-optimizer = { path = "datafusion/physical-optimizer", version = "40.0.0" }
datafusion-physical-plan = { path = "datafusion/physical-plan", version = "40.0.0" }
datafusion-proto = { path = "datafusion/proto", version = "40.0.0" }
datafusion-proto-common = { path = "datafusion/proto-common", version = "40.0.0" }
Expand Down
92 changes: 50 additions & 42 deletions datafusion-cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions datafusion/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ datafusion-functions-array = { workspace = true, optional = true }
datafusion-optimizer = { workspace = true }
datafusion-physical-expr = { workspace = true }
datafusion-physical-expr-common = { workspace = true }
datafusion-physical-optimizer = { workspace = true }
datafusion-physical-plan = { workspace = true }
datafusion-sql = { workspace = true }
flate2 = { version = "1.0.24", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion datafusion/core/src/execution/session_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ use crate::execution::context::{EmptySerializerRegistry, FunctionFactory, QueryP
#[cfg(feature = "array_expressions")]
use crate::functions_array;
use crate::physical_optimizer::optimizer::PhysicalOptimizer;
use crate::physical_optimizer::PhysicalOptimizerRule;
use crate::physical_planner::{DefaultPhysicalPlanner, PhysicalPlanner};
use crate::{functions, functions_aggregate};
use arrow_schema::{DataType, SchemaRef};
Expand Down Expand Up @@ -74,6 +73,7 @@ use datafusion_optimizer::{
};
use datafusion_physical_expr::create_physical_expr;
use datafusion_physical_expr_common::physical_expr::PhysicalExpr;
use datafusion_physical_optimizer::PhysicalOptimizerRule;
use datafusion_physical_plan::ExecutionPlan;
use datafusion_sql::parser::{DFParser, Statement};
use datafusion_sql::planner::{ContextProvider, ParserOptions, PlannerContext, SqlToRel};
Expand Down
2 changes: 1 addition & 1 deletion datafusion/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
//! [`QueryPlanner`]: execution::context::QueryPlanner
//! [`OptimizerRule`]: datafusion_optimizer::optimizer::OptimizerRule
//! [`AnalyzerRule`]: datafusion_optimizer::analyzer::AnalyzerRule
//! [`PhysicalOptimizerRule`]: crate::physical_optimizer::optimizer::PhysicalOptimizerRule
//! [`PhysicalOptimizerRule`]: crate::physical_optimizer::PhysicalOptimizerRule
//!
//! ## Query Planning and Execution Overview
//!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
//! Utilizing exact statistics from sources to avoid scanning data
use std::sync::Arc;

use super::optimizer::PhysicalOptimizerRule;
use crate::config::ConfigOptions;
use crate::error::Result;
use crate::physical_plan::aggregates::AggregateExec;
Expand All @@ -29,6 +28,7 @@ use crate::scalar::ScalarValue;
use datafusion_common::stats::Precision;
use datafusion_common::tree_node::{Transformed, TransformedResult, TreeNode};
use datafusion_expr::utils::COUNT_STAR_EXPANSION;
use datafusion_physical_optimizer::PhysicalOptimizerRule;
use datafusion_physical_plan::placeholder_row::PlaceholderRowExec;
use datafusion_physical_plan::udaf::AggregateFunctionExpr;

Expand Down
Loading

0 comments on commit 7992af9

Please sign in to comment.