evadb icon indicating copy to clipboard operation
evadb copied to clipboard

Missing Similarity Function

Open jarulraj opened this issue 1 year ago • 8 comments

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!

jarulraj avatar Sep 22 '23 00:09 jarulraj

@hershd23 It looks like the fuzzing logic is needed for both table name and function name typos.

jarulraj avatar Oct 04 '23 17:10 jarulraj

Sure @jarulraj

hershd23 avatar Oct 04 '23 17:10 hershd23

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

hershd23 avatar Oct 16 '23 04:10 hershd23

Also see the Similarity function in bootstrap queries

https://github.com/georgia-tech-db/evadb/blob/bf0223290f396303bba1706dded062654b5cefc4/evadb/functions/function_bootstrap_queries.py#L104

hershd23 avatar Oct 16 '23 05:10 hershd23

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

xzdandy avatar Oct 17 '23 07:10 xzdandy

I will be taking this issue up with Hersh.

Omanshb avatar Oct 18 '23 21:10 Omanshb

@xzdandy do you how we can get a list of all function names/identifiers. I think that will make this issue pretty trivial

hershd23 avatar Oct 18 '23 21:10 hershd23

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!

xzdandy avatar Oct 19 '23 06:10 xzdandy