Skip to content

Commit

Permalink
style: more consistent imports
Browse files Browse the repository at this point in the history
  • Loading branch information
roeap committed Aug 16, 2024
1 parent 64c5250 commit 8a3e5ed
Show file tree
Hide file tree
Showing 38 changed files with 211 additions and 220 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ datafusion-common = { version = "41" }
datafusion-proto = { version = "41" }
datafusion-sql = { version = "41" }
datafusion-physical-expr = { version = "41" }
datafusion-physical-plan = { version = "41" }
datafusion-functions = { version = "41" }
datafusion-functions-aggregate = { version = "41" }

Expand Down
2 changes: 2 additions & 0 deletions crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ datafusion-common = { workspace = true, optional = true }
datafusion-proto = { workspace = true, optional = true }
datafusion-sql = { workspace = true, optional = true }
datafusion-physical-expr = { workspace = true, optional = true }
datafusion-physical-plan = { workspace = true, optional = true }
datafusion-functions = { workspace = true, optional = true }
datafusion-functions-aggregate = { workspace = true, optional = true }

Expand Down Expand Up @@ -127,6 +128,7 @@ datafusion = [
"datafusion-common",
"datafusion-proto",
"datafusion-physical-expr",
"datafusion-physical-plan",
"datafusion-sql",
"datafusion-functions",
"datafusion-functions-aggregate",
Expand Down
13 changes: 5 additions & 8 deletions crates/core/src/delta_datafusion/cdf/mod.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
//! Logical operators and physical executions for CDF
use std::collections::HashMap;

use arrow_schema::{DataType, Field, TimeUnit};
use lazy_static::lazy_static;
use std::collections::HashMap;

pub(crate) use scan::*;
pub(crate) use scan_utils::*;

use crate::{
kernel::{Add, AddCDCFile, Remove},
DeltaResult,
};
pub(crate) use self::scan::*;
pub(crate) use self::scan_utils::*;
use crate::kernel::{Add, AddCDCFile, Remove};
use crate::DeltaResult;

mod scan;
mod scan_utils;
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/delta_datafusion/cdf/scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::sync::Arc;

use arrow_schema::SchemaRef;
use datafusion::execution::{SendableRecordBatchStream, TaskContext};
use datafusion::physical_plan::{DisplayAs, DisplayFormatType, ExecutionPlan};
use datafusion_physical_plan::{DisplayAs, DisplayFormatType, ExecutionPlan};

/// Physical execution of a scan
#[derive(Debug, Clone)]
Expand Down
17 changes: 6 additions & 11 deletions crates/core/src/delta_datafusion/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@
// Display functions and required macros were pulled from https://github.com/apache/arrow-datafusion/blob/ddb95497e2792015d5a5998eec79aac8d37df1eb/datafusion/expr/src/expr.rs

//! Utility functions for Datafusion's Expressions
use std::{
fmt::{self, Display, Error, Formatter, Write},
sync::Arc,
};
use std::fmt::{self, Display, Error, Formatter, Write};
use std::sync::Arc;

use arrow_schema::DataType;
use chrono::{DateTime, NaiveDate};
Expand All @@ -33,19 +30,17 @@ use datafusion::execution::session_state::SessionStateBuilder;
use datafusion::execution::FunctionRegistry;
use datafusion_common::Result as DFResult;
use datafusion_common::{config::ConfigOptions, DFSchema, Result, ScalarValue, TableReference};
use datafusion_expr::{
expr::InList, planner::ExprPlanner, AggregateUDF, Between, BinaryExpr, Cast, Expr, Like,
TableSource,
};
use datafusion_expr::expr::InList;
use datafusion_expr::planner::ExprPlanner;
use datafusion_expr::{AggregateUDF, Between, BinaryExpr, Cast, Expr, Like, TableSource};
use datafusion_sql::planner::{ContextProvider, SqlToRel};
use datafusion_sql::sqlparser::ast::escape_quoted_string;
use datafusion_sql::sqlparser::dialect::GenericDialect;
use datafusion_sql::sqlparser::parser::Parser;
use datafusion_sql::sqlparser::tokenizer::Tokenizer;

use crate::{DeltaResult, DeltaTableError};

use super::DeltaParserOptions;
use crate::{DeltaResult, DeltaTableError};

pub(crate) struct DeltaContextProvider<'a> {
state: SessionState,
Expand Down
8 changes: 4 additions & 4 deletions crates/core/src/delta_datafusion/find_files/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use arrow_array::cast::AsArray;
use std::sync::Arc;

use arrow_array::cast::AsArray;
use arrow_array::types::UInt16Type;
use arrow_array::RecordBatch;
use arrow_schema::SchemaBuilder;
Expand All @@ -10,13 +10,13 @@ use async_trait::async_trait;
use datafusion::datasource::MemTable;
use datafusion::execution::context::{QueryPlanner, SessionState};
use datafusion::execution::TaskContext;
use datafusion::physical_plan::filter::FilterExec;
use datafusion::physical_plan::limit::LocalLimitExec;
use datafusion::physical_plan::ExecutionPlan;
use datafusion::physical_planner::{DefaultPhysicalPlanner, ExtensionPlanner, PhysicalPlanner};
use datafusion::prelude::SessionContext;
use datafusion_common::{DFSchemaRef, Result, ToDFSchema};
use datafusion_expr::{col, Expr, LogicalPlan, UserDefinedLogicalNode};
use datafusion_physical_plan::filter::FilterExec;
use datafusion_physical_plan::limit::LocalLimitExec;
use datafusion_physical_plan::ExecutionPlan;
use lazy_static::lazy_static;

use crate::delta_datafusion::find_files::logical::FindFilesNode;
Expand Down
8 changes: 4 additions & 4 deletions crates/core/src/delta_datafusion/find_files/physical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ use arrow_array::RecordBatch;
use arrow_schema::SchemaRef;
use datafusion::error::Result;
use datafusion::execution::{RecordBatchStream, SendableRecordBatchStream, TaskContext};
use datafusion::physical_plan::memory::MemoryStream;
use datafusion::physical_plan::{
DisplayAs, DisplayFormatType, ExecutionMode, ExecutionPlan, PlanProperties,
};
use datafusion::prelude::SessionContext;
use datafusion_common::tree_node::TreeNode;
use datafusion_expr::Expr;
use datafusion_physical_expr::{EquivalenceProperties, Partitioning};
use datafusion_physical_plan::memory::MemoryStream;
use datafusion_physical_plan::{
DisplayAs, DisplayFormatType, ExecutionMode, ExecutionPlan, PlanProperties,
};
use futures::stream::BoxStream;
use futures::{FutureExt, Stream, StreamExt, TryStreamExt};

Expand Down
Loading

0 comments on commit 8a3e5ed

Please sign in to comment.