opteryx
opteryx copied to clipboard
✨ Rewrite RLIKE operations to LIKE and INSTR where possible
| Regex Pattern | Optimized Form |
|---|---|
^abc$ |
col = 'abc' |
^abc |
col LIKE 'abc%' |
abc$ |
col LIKE '%abc' |
.*abc.* |
col LIKE '%abc%' |
abc (no .*) |
col INSTR 'abc' |
a.c |
col LIKE 'a_c' |