viirya commented on issue #9892:
URL: 
https://github.com/apache/arrow-datafusion/issues/9892#issuecomment-2030171353

   > I think you can do this via one of these functions (I can't link to 
rustdocs as 37 hasn't yet been released and the functions are made via macro):
   
   Hmm, I think you mean that `expr_fn` module exports individual scalar 
functions. But to get corresponding function from a string of the scalar 
function name, we need to write a function like:
   
   ```rust
   fn string_to_scalar_udf(udf_name: &str) -> Arc<ScalarUDF> {
     match udf_name {
       "ascii" -> datafusion_functions::string::ascii(),
       ...
     }
   }
   ``` 
   
   It is doable thought it means we need to maintain a long list of matches, 
but I'm also wondering if there is a better built-in solution in DataFusion.
   


-- 
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