Skip to content

Commit

Permalink
Fix up clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Jul 24, 2024
1 parent 6436499 commit acfcece
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion datafusion/expr/src/expr_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ impl ExprFuncBuilder {
Expr::AggregateFunction(udaf)
}
ExprFuncKind::Window(mut udwf) => {
let has_order_by = order_by.as_ref().map(|o| o.len() > 0);
let has_order_by = order_by.as_ref().map(|o| !o.is_empty());
udwf.order_by = order_by.unwrap_or_default();
udwf.partition_by = partition_by.unwrap_or_default();
udwf.window_frame =
Expand Down
4 changes: 0 additions & 4 deletions datafusion/expr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
// under the License.
// Make cheap clones clear: https://github.com/apache/datafusion/issues/11143
#![deny(clippy::clone_on_ref_ptr)]
// TODO When the deprecated trait AggregateExt is removed, remove this unstable feature.
#![feature(trait_alias)]

//! [DataFusion](https://github.com/apache/datafusion)
//! is an extensible query execution framework that uses
Expand Down Expand Up @@ -89,8 +87,6 @@ pub use signature::{
};
pub use sqlparser;
pub use table_source::{TableProviderFilterPushDown, TableSource, TableType};
#[allow(deprecated)]
pub use udaf::AggregateExt;
pub use udaf::{AggregateUDF, AggregateUDFImpl, ReversedUDAF};
pub use udf::{ScalarUDF, ScalarUDFImpl};
pub use udwf::{WindowUDF, WindowUDFImpl};
Expand Down
8 changes: 2 additions & 6 deletions datafusion/expr/src/udaf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use crate::function::{
use crate::groups_accumulator::GroupsAccumulator;
use crate::utils::format_state_name;
use crate::utils::AggregateOrderSensitivity;
use crate::{Accumulator, Expr, ExprFunctionExt};
use crate::{Accumulator, Expr};
use crate::{AccumulatorFactoryFunction, ReturnTypeFunction, Signature};

/// Logical representation of a user-defined [aggregate function] (UDAF).
Expand Down Expand Up @@ -653,8 +653,4 @@ impl AggregateUDFImpl for AggregateUDFLegacyWrapper {
fn accumulator(&self, acc_args: AccumulatorArgs) -> Result<Box<dyn Accumulator>> {
(self.accumulator)(acc_args)
}
}

#[deprecated(since = "40.0.0", note = "Use ExprFunctionExt instead.")]
// pub trait AggregateExt : ExprFunctionExt {}
pub trait AggregateExt = ExprFunctionExt;
}

0 comments on commit acfcece

Please sign in to comment.