@@ -27,9 +27,25 @@ use std::sync::Arc;
2727
2828/// A registry knows how to build logical expressions out of user-defined function' names
2929pub trait FunctionRegistry {
30- /// Set of all available udfs .
30+ /// Returns names of all available scalar user defined functions .
3131 fn udfs ( & self ) -> HashSet < String > ;
3232
33+ /// Returns names of all available aggregate user defined functions.
34+ fn udafs ( & self ) -> HashSet < String > {
35+ // This default implementation is provided temporarily
36+ // to maintain backward compatibility for the 50.1 release.
37+ // It will be reverted to a required method in future versions.
38+ HashSet :: default ( )
39+ }
40+
41+ /// Returns names of all available window user defined functions.
42+ fn udwfs ( & self ) -> HashSet < String > {
43+ // This default implementation is provided temporarily
44+ // to maintain backward compatibility for the 50.1 release.
45+ // It will be reverted to a required method in future versions.
46+ HashSet :: default ( )
47+ }
48+
3349 /// Returns a reference to the user defined scalar function (udf) named
3450 /// `name`.
3551 fn udf ( & self , name : & str ) -> Result < Arc < ScalarUDF > > ;
@@ -200,4 +216,12 @@ impl FunctionRegistry for MemoryFunctionRegistry {
200216 fn expr_planners ( & self ) -> Vec < Arc < dyn ExprPlanner > > {
201217 vec ! [ ]
202218 }
219+
220+ fn udafs ( & self ) -> HashSet < String > {
221+ self . udafs . keys ( ) . cloned ( ) . collect ( )
222+ }
223+
224+ fn udwfs ( & self ) -> HashSet < String > {
225+ self . udwfs . keys ( ) . cloned ( ) . collect ( )
226+ }
203227}
0 commit comments