alamb commented on code in PR #9407:
URL: https://github.com/apache/arrow-datafusion/pull/9407#discussion_r1510008892


##########
datafusion/sql/src/planner.rs:
##########
@@ -85,6 +85,10 @@ pub trait ContextProvider {
 
     /// Get configuration options
     fn options(&self) -> &ConfigOptions;
+
+    fn udfs(&self) -> HashMap<String, Arc<ScalarUDF>>;

Review Comment:
   This sort of exposes details of the implementation (e.g. a `HashMap`)
   
   What about potentially just returning the names following the model of 
CatalogProvider or SchemaProvider: 
https://docs.rs/datafusion/latest/datafusion/catalog/schema/trait.SchemaProvider.html#tymethod.table_names
   
   
   Something like
   
   ```suggestion
       /// returns all udf names
       fn udf_names(&self) -> Vec<&str>
   ```
   
   (or maybe Strings)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to