Skip to content

Commit

Permalink
move physical expression planning
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove committed Jun 2, 2022
1 parent 1160acc commit f3d5d71
Show file tree
Hide file tree
Showing 7 changed files with 356 additions and 328 deletions.
2 changes: 1 addition & 1 deletion datafusion/core/src/optimizer/simplify_expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use crate::execution::context::ExecutionProps;
use crate::logical_plan::{ExprSimplifiable, SimplifyInfo};
use crate::optimizer::optimizer::{OptimizerConfig, OptimizerRule};
use crate::physical_plan::planner::create_physical_expr;
use arrow::array::new_null_array;
use arrow::datatypes::{DataType, Field, Schema};
use arrow::record_batch::RecordBatch;
Expand All @@ -33,6 +32,7 @@ use datafusion_expr::{
utils::from_plan,
Expr, ExprSchemable, Operator, Volatility,
};
use datafusion_physical_expr::create_physical_expr;

/// Provides simplification information based on schema and properties
pub(crate) struct SimplifyContext<'a, 'b> {
Expand Down
15 changes: 7 additions & 8 deletions datafusion/core/src/physical_optimizer/pruning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,21 @@
use std::convert::TryFrom;
use std::{collections::HashSet, sync::Arc};

use arrow::{
array::{new_null_array, ArrayRef, BooleanArray},
datatypes::{DataType, Field, Schema, SchemaRef},
record_batch::RecordBatch,
};
use datafusion_expr::utils::expr_to_columns;

use crate::execution::context::ExecutionProps;
use crate::physical_plan::planner::create_physical_expr;
use crate::prelude::lit;
use crate::{
error::{DataFusionError, Result},
logical_plan::{Column, DFSchema, Expr, Operator},
optimizer::utils,
physical_plan::{ColumnarValue, PhysicalExpr},
};
use arrow::{
array::{new_null_array, ArrayRef, BooleanArray},
datatypes::{DataType, Field, Schema, SchemaRef},
record_batch::RecordBatch,
};
use datafusion_expr::utils::expr_to_columns;
use datafusion_physical_expr::create_physical_expr;

/// Interface to pass statistics information to [`PruningPredicate`]
///
Expand Down
3 changes: 1 addition & 2 deletions datafusion/core/src/physical_plan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,9 @@ pub mod sort_merge_join;
pub mod sorts;
pub mod stream;
pub mod udaf;
pub mod udf;
pub mod union;
pub mod values;
pub mod windows;

use crate::execution::context::TaskContext;
pub use datafusion_physical_expr::{expressions, functions, type_coercion};
pub use datafusion_physical_expr::{expressions, functions, type_coercion, udf};
Loading

0 comments on commit f3d5d71

Please sign in to comment.