Skip to content

Commit f739684

Browse files
findepisadboy
authored andcommitted
fixup! Snapshot PR: Extract complex default impls from AggregateUDFImpl trait
1 parent 475a97d commit f739684

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
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,

datafusion/expr/src/udaf.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ impl PartialOrd for dyn AggregateUDFImpl {
779779
}
780780
}
781781

782-
fn udaf_default_schema_name<F: AggregateUDFImpl + ?Sized>(
782+
pub fn udaf_default_schema_name<F: AggregateUDFImpl + ?Sized>(
783783
func: &F,
784784
params: &AggregateFunctionParams,
785785
) -> Result<String> {
@@ -832,7 +832,7 @@ fn udaf_default_schema_name<F: AggregateUDFImpl + ?Sized>(
832832
Ok(schema_name)
833833
}
834834

835-
fn udaf_default_human_display<F: AggregateUDFImpl + ?Sized>(
835+
pub fn udaf_default_human_display<F: AggregateUDFImpl + ?Sized>(
836836
func: &F,
837837
params: &AggregateFunctionParams,
838838
) -> Result<String> {
@@ -871,7 +871,7 @@ fn udaf_default_human_display<F: AggregateUDFImpl + ?Sized>(
871871
Ok(schema_name)
872872
}
873873

874-
fn udaf_default_window_function_schema_name<F: AggregateUDFImpl + ?Sized>(
874+
pub fn udaf_default_window_function_schema_name<F: AggregateUDFImpl + ?Sized>(
875875
func: &F,
876876
params: &WindowFunctionParams,
877877
) -> Result<String> {
@@ -929,7 +929,7 @@ fn udaf_default_window_function_schema_name<F: AggregateUDFImpl + ?Sized>(
929929
Ok(schema_name)
930930
}
931931

932-
fn udaf_default_display_name<F: AggregateUDFImpl + ?Sized>(
932+
pub fn udaf_default_display_name<F: AggregateUDFImpl + ?Sized>(
933933
func: &F,
934934
params: &AggregateFunctionParams,
935935
) -> Result<String> {
@@ -970,7 +970,7 @@ fn udaf_default_display_name<F: AggregateUDFImpl + ?Sized>(
970970
Ok(display_name)
971971
}
972972

973-
fn udaf_default_window_function_display_name<F: AggregateUDFImpl + ?Sized>(
973+
pub fn udaf_default_window_function_display_name<F: AggregateUDFImpl + ?Sized>(
974974
func: &F,
975975
params: &WindowFunctionParams,
976976
) -> Result<String> {
@@ -1028,7 +1028,7 @@ fn udaf_default_window_function_display_name<F: AggregateUDFImpl + ?Sized>(
10281028
Ok(display_name)
10291029
}
10301030

1031-
fn udaf_default_return_field<F: AggregateUDFImpl + ?Sized>(
1031+
pub fn udaf_default_return_field<F: AggregateUDFImpl + ?Sized>(
10321032
func: &F,
10331033
arg_fields: &[FieldRef],
10341034
) -> Result<FieldRef> {

0 commit comments

Comments
 (0)