-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
Comparing case-insensitive strings can be source for confusion.
we must use lower() on both sides of the query like shown:
https://stackoverflow.com/questions/42850329/how-to-configure-presto-searches-to-be-case-insensitive
Some DBs like PostgreSQL extended to support also ILIKE
The key word ILIKE can be used instead of LIKE to make the match case-insensitive according to the active locale. This is not in the SQL standard but is a PostgreSQL extension.
The operator ~~ is equivalent to LIKE, and ~~ * corresponds to ILIKE. There are also !~~ and !~~* operators that represent NOT LIKE and NOT ILIKE, respectively. All of these operators are PostgreSQL-specific.
https://www.postgresql.org/docs/current/functions-matching.html
This is very useful. I hope this can be added to Presto.