Skip to content

ESQL: pushdown to_upper/to_lower in like/rlike #127479

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
costin opened this issue Apr 28, 2025 · 2 comments
Open

ESQL: pushdown to_upper/to_lower in like/rlike #127479

costin opened this issue Apr 28, 2025 · 2 comments
Labels
:Analytics/ES|QL AKA ESQL >enhancement Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)

Comments

@costin
Copy link
Member

costin commented Apr 28, 2025

Description

Similar to #118304, ESQL should catch this "pattern" not just for equality but also pattern matching:

...
| WHERE  TO_UPPER(string_a) like "String"	            // this will never match since the value contains lower case chars
| WHERE  TO_LOWER(string_b) like "abc"               // rewritten as a case-insensitive wildcard query
| WHERE  TO_LOWER(string_b) rlike "abc.*xyz"      // rewritten as a case-insensitive regex query
...
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Apr 28, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@luigidellaquila
Copy link
Contributor

We'll have to consider this apache/lucene#14378 (and the fix)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL >enhancement Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)
Projects
None yet
Development

No branches or pull requests

3 participants