Skip to content

Commit

Permalink
Move some datafusion-optimizer::utils down to datafusion-expr::utils
Browse files Browse the repository at this point in the history
These utils manipulate `LogicalPlan`s and `Expr`s and may be useful in
projects that only depend on `datafusion-expr`
  • Loading branch information
Jesse-Bakker committed Nov 29, 2023
1 parent f1dbb2d commit d9c1878
Show file tree
Hide file tree
Showing 16 changed files with 499 additions and 337 deletions.
2 changes: 1 addition & 1 deletion benchmarks/src/parquet_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ use crate::AccessLogOpt;
use crate::{BenchmarkRun, CommonOpt};
use arrow::util::pretty;
use datafusion::common::Result;
use datafusion::logical_expr::utils::disjunction;
use datafusion::logical_expr::{lit, or, Expr};
use datafusion::optimizer::utils::disjunction;
use datafusion::physical_plan::collect;
use datafusion::prelude::{col, SessionContext};
use datafusion::test_util::parquet::{ParquetScanOptions, TestParquetFile};
Expand Down
4 changes: 1 addition & 3 deletions datafusion/core/src/datasource/listing/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@ use crate::datasource::{
physical_plan::{is_plan_streaming, FileScanConfig, FileSinkConfig},
TableProvider, TableType,
};
use crate::logical_expr::TableProviderFilterPushDown;
use crate::{
error::{DataFusionError, Result},
execution::context::SessionState,
logical_expr::Expr,
logical_expr::{utils::conjunction, Expr, TableProviderFilterPushDown},
physical_plan::{empty::EmptyExec, ExecutionPlan, Statistics},
};

Expand All @@ -56,7 +55,6 @@ use datafusion_common::{
};
use datafusion_execution::cache::cache_manager::FileStatisticsCache;
use datafusion_execution::cache::cache_unit::DefaultFileStatisticsCache;
use datafusion_optimizer::utils::conjunction;
use datafusion_physical_expr::{
create_physical_expr, LexOrdering, PhysicalSortRequirement,
};
Expand Down
2 changes: 1 addition & 1 deletion datafusion/core/tests/parquet/filter_pushdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use datafusion::physical_plan::collect;
use datafusion::physical_plan::metrics::MetricsSet;
use datafusion::prelude::{col, lit, lit_timestamp_nano, Expr, SessionContext};
use datafusion::test_util::parquet::{ParquetScanOptions, TestParquetFile};
use datafusion_optimizer::utils::{conjunction, disjunction, split_conjunction};
use datafusion_expr::utils::{conjunction, disjunction, split_conjunction};
use itertools::Itertools;
use parquet::file::properties::WriterProperties;
use tempfile::TempDir;
Expand Down
Loading

0 comments on commit d9c1878

Please sign in to comment.