Skip to content

Commit 8698d95

Browse files
authored
Extract complex default impls from AggregateUDFImpl trait (#17391)
* Extract complex default impls from AggregateUDFImpl trait Extract AggregateUDFImpl method that have complex implementations. This makes it feasible to implement that trait with `#[warn(clippy::missing_trait_methods)]` Clippy check enabled. That check is very helpful when the type implementing `AggregateUDFImpl` delegates many methods to another `AggregateUDFImpl` implementation and therefore does not want to unconsciously rely on default implementation. Sadly, Rust does not allow explicitly delegating to trait method's default implementation. Extracting the logic to standalone functions works around that limitation. * Docs
1 parent 9942ecd commit 8698d95

File tree

2 files changed

+282
-233
lines changed

2 files changed

+282
-233
lines changed

datafusion/expr/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,10 @@ pub use partition_evaluator::PartitionEvaluator;
105105
pub use sqlparser;
106106
pub use table_source::{TableProviderFilterPushDown, TableSource, TableType};
107107
pub use udaf::{
108-
aggregate_doc_sections, AggregateUDF, AggregateUDFImpl, ReversedUDAF,
109-
SetMonotonicity, StatisticsArgs,
108+
aggregate_doc_sections, udaf_default_display_name, udaf_default_human_display,
109+
udaf_default_return_field, udaf_default_schema_name,
110+
udaf_default_window_function_display_name, udaf_default_window_function_schema_name,
111+
AggregateUDF, AggregateUDFImpl, ReversedUDAF, SetMonotonicity, StatisticsArgs,
110112
};
111113
pub use udf::{
112114
scalar_doc_sections, ReturnFieldArgs, ScalarFunctionArgs, ScalarUDF, ScalarUDFImpl,

0 commit comments

Comments
 (0)