Proposal: Add similar to operator
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Add support for the SIMILAR TO operator like:
string SIMILAR TO pattern [ESCAPE escape-character]
string NOT SIMILAR TO pattern [ESCAPE escape-character]
(This section helps Arrow developers understand the context and why for this feature, in addition to the what)
Describe the solution you'd like
Support this sql syntax where currently users would see a parser error Expected end of statement, found: SIMILAR
Describe alternatives you've considered
There is some overlap between the LIKE operator and SIMILAR though the regex interpretation might be slightly different.
Additional context Syntax from the postgresql documentation: https://www.postgresql.org/docs/current/functions-matching.html. Came up while working on tests in the dask-sql project.
Seems reasonable to me
Nice feature for datafusion core. Do you have a plan to implement it? @ayushdg
I am planning on implementing this but also happy if anyone else wants to pick it up
sqlparser support was added here: https://github.com/sqlparser-rs/sqlparser-rs/pull/569
I'll try and get a new release of that library out in a day or two
This is now being tracked in https://github.com/apache/arrow-datafusion/issues/3099