cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.1k stars 3.81k forks source link

builtins: support fuzzystrmatch builtins #56820

Open jordanlewis opened 3 years ago

jordanlewis commented 3 years ago

Postgres provides the fuzzystrmatch module, which includes several useful functions:

Out of these, the levenshtein functions are likely most important and widely-used.

To implement these, add functions in pkg/sql/sem/builtins/builtins.go and a new logic test in pkg/sql/logictest/testdata/logic_test/fuzzystrmatch.

Jira issue: CRDB-11073

blathers-crl[bot] commented 3 years ago

Hi @jordanlewis, please add a C-ategory label to your issue. Check out the label system docs.

:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

rafiss commented 3 years ago

Only one builtin was added in #56843 so keeping this open

eaarranz commented 3 years ago

I have improved a little bit the levenshtein implementation to be more similar to the one that Postgresql implements and that implements the levenshtein_less_equal builtin.

I will open a PR, but we may reopen this issue and I can try to implement also the: metaphone, dmetaphone and dmetaphone_alt missing ones!

alimoosavi commented 2 years ago

@jordanlewis @otan I am new to cockroachdb project and this issue seems attractive to me , please assign this issue to me.

otan commented 2 years ago

we generally don't assign issues. you are however free to work on it!

note there is already a PR for levenshtein_less_equal

SentientRamen12 commented 1 year ago

Hi @otan @jordanlewis I see the levenshtein_less_equal PR still open. Can I pick this issue?

jordanlewis commented 1 year ago

Yes!

On Mon, Mar 27, 2023 at 3:58 PM LordThevenin @.***> wrote:

Hi @otan https://github.com/otan @jordanlewis https://github.com/jordanlewis I see the levenshtein_less_equal PR still open. Can I pick this issue?

— Reply to this email directly, view it on GitHub https://github.com/cockroachdb/cockroach/issues/56820#issuecomment-1485781174, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAKWLLIKUOF6EQHFEGMQY3W6HWMXANCNFSM4TZBP6CQ . You are receiving this because you were mentioned.Message ID: @.***>

Azanul commented 1 year ago

No-one seems to be working on this. I think I can implement levenshtein_less_equal.

giangpham712 commented 1 year ago

This affects efcore.pg tests

@fqazi

fqazi commented 1 year ago

@giangpham712 Let's skip these tests for now since I don't think we'll get the remaining ones quickly