Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-J-Ward committed Aug 10, 2024
1 parent 8311b05 commit 9108f18
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use crate::errors::DataFusionError;
use crate::utils::wait_for_future;
use datafusion::{
arrow::pyarrow::ToPyArrow,
catalog::{SchemaProvider, CatalogProvider},
catalog::{CatalogProvider, SchemaProvider},
datasource::{TableProvider, TableType},
};

Expand Down
1 change: 0 additions & 1 deletion src/common/data_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,6 @@ pub enum NullTreatment {
RESPECT_NULLS,
}


impl From<NullTreatment> for DFNullTreatment {
fn from(null_treatment: NullTreatment) -> DFNullTreatment {
match null_treatment {
Expand Down
4 changes: 1 addition & 3 deletions src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ use datafusion::datasource::listing::{
};
use datafusion::datasource::MemTable;
use datafusion::datasource::TableProvider;
use datafusion::execution::context::{
SQLOptions, SessionConfig, SessionContext, TaskContext,
};
use datafusion::execution::context::{SQLOptions, SessionConfig, SessionContext, TaskContext};
use datafusion::execution::disk_manager::DiskManagerConfig;
use datafusion::execution::memory_pool::{FairSpillPool, GreedyMemoryPool, UnboundedMemoryPool};
use datafusion::execution::runtime_env::{RuntimeConfig, RuntimeEnv};
Expand Down
10 changes: 4 additions & 6 deletions src/expr/aggregate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ impl PyAggregate {
match expr {
// TODO: This Alias logic seems to be returning some strange results that we should investigate
Expr::Alias(Alias { expr, .. }) => self._aggregation_arguments(expr.as_ref()),
Expr::AggregateFunction(AggregateFunction {
func: _, args, ..
}) => Ok(args.iter().map(|e| PyExpr::from(e.clone())).collect()),
Expr::AggregateFunction(AggregateFunction { func: _, args, .. }) => {
Ok(args.iter().map(|e| PyExpr::from(e.clone())).collect())
}
_ => Err(py_type_err(
"Encountered a non Aggregate type in aggregation_arguments",
)),
Expand All @@ -138,9 +138,7 @@ impl PyAggregate {
fn _agg_func_name(expr: &Expr) -> PyResult<String> {
match expr {
Expr::Alias(Alias { expr, .. }) => Self::_agg_func_name(expr.as_ref()),
Expr::AggregateFunction(AggregateFunction { func, .. }) => {
Ok(func.name().to_owned())
}
Expr::AggregateFunction(AggregateFunction { func, .. }) => Ok(func.name().to_owned()),
_ => Err(py_type_err(
"Encountered a non Aggregate type in agg_func_name",
)),
Expand Down

0 comments on commit 9108f18

Please sign in to comment.