viirya opened a new issue, #9892: URL: https://github.com/apache/arrow-datafusion/issues/9892
### Is your feature request related to a problem or challenge? Currently more and more built-in scalar functions are moved to `functions` modules, e.g. https://github.com/apache/arrow-datafusion/pull/9435. It avoids using a long enum of all built-in scalar functions which is hard to maintain. But for Comet, we rely the ability to create a physical scalar expression from string (e.g., `datepart`). Previously it is easy and just calls `BuiltinScalarFunction::from_str` to get `BuiltinScalarFunction`. But now I don't see such convenient function to do that. `FunctionRegistry` provides `udf` which can return a reference to `ScalarUDF`. But it requires these UDFs must be registered. As we don't know what UDFs will be used, we need to register all built-in UDFs in the registry. The flaw is, it will create `ScalarUDF`s for all built-in UDFs even they are not actually used in the queries. I think we still need an approach that can simply create a physical scalar expression in `functions` modules from string. So we can create corresponding `ScalarUDF` on demand. ### Describe the solution you'd like _No response_ ### Describe alternatives you've considered _No response_ ### Additional context _No response_ -- 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]
