evadb
evadb copied to clipboard
Missing Similarity Function
Search before asking
- [X] I have searched the EvaDB issues and found no similar bug report.
Bug
Function 'Similarity' does not exist in the catalog. Please create the function using CREATE UDF command.
Need to change it to CREATE FUNCTION
. It would be neat if we could suggest a closely named function if there is a typo in the query.
Environment
No response
Are you willing to submit a PR?
- [ ] Yes I'd like to help by submitting a PR!
@hershd23 It looks like the fuzzing logic is needed for both table name and function name typos.
Sure @jarulraj
I ran the similarity checks in the long integration tests and they work fine. I get the fuzzy error message logic part for the functions. Can you let me know if I am not getting something? Similarity tests are working fine so don't understand what the issue is with that
Also see the Similarity function in bootstrap queries
https://github.com/georgia-tech-db/evadb/blob/bf0223290f396303bba1706dded062654b5cefc4/evadb/functions/function_bootstrap_queries.py#L104
Hi @hershd23, I think what Joy meant is the error message at https://github.com/georgia-tech-db/evadb/blob/staging/evadb/binder/statement_binder.py#L287. This has been already fixed.
One improvement is to suggest possible functions, when there is a typo in function name. For reference, we did that for columns at https://github.com/georgia-tech-db/evadb/blob/staging/evadb/binder/statement_binder_context.py#L155
I will be taking this issue up with Hersh.
@xzdandy do you how we can get a list of all function names/identifiers. I think that will make this issue pretty trivial
Hi @Omanshb , @hershd23 Please check https://github.com/georgia-tech-db/evadb/blob/89e48889186d919fdade64961d1a8277bdc9e946/evadb/catalog/catalog_manager.py#L370C5-L370C48
Thanks for the help!