Skip to content

Implement ILIKE predicate #2491

@RosterIn

Description

@RosterIn

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions