alamb opened a new issue, #9392: URL: https://github.com/apache/arrow-datafusion/issues/9392
### Is your feature request related to a problem or challenge? Part of https://github.com/apache/arrow-datafusion/issues/8045 Today there is a nice error message with a hint if a user issues an unknown function For example, tryng `cos2` will have datafusion suggest `cos` ``` DataFusion CLI v36.0.0 ❯ select cos2(1); Error during planning: Invalid function 'cos2'. Did you mean 'cos'? ``` However, UDFs are never suggested For example, the function `abs` has been moved to a ScalarUDF, so now the error message does not suggest this. ```sql DataFusion CLI v36.0.0 ❯ select abs2(1); Error during planning: Invalid function 'abs2'. Did you mean 'acos'? ``` but in earlier versions of DataFusion where `abs` was a built in function, it is correctly suggested: ```sql DataFusion CLI v32.0.0 ❯ select abs2(1); Error during planning: Invalid function 'abs2'. Did you mean 'abs'? ``` ### Describe the solution you'd like I would like UDFs to be included in the suggestsed the error message ### Describe alternatives you've considered Here is where the suggestion is created: https://github.com/apache/arrow-datafusion/blob/cf69d38e80448ec7402f622d2adcfc6edf0b387e/datafusion/sql/src/expr/function.rs#L214-L215 I think it will be a fairly straightforward exercise to extend the list in https://github.com/apache/arrow-datafusion/blob/cf69d38e80448ec7402f622d2adcfc6edf0b387e/datafusion/expr/src/function.rs#L80-L94 to ### Additional context This came up in the context of https://github.com/apache/arrow-datafusion/pull/9388, https://github.com/apache/arrow-datafusion/pull/9388#discussion_r1506662726 -- 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]
