Skip to content

ESQL: look to pushdown case insensitive functions #118304

@costin

Description

@costin

Description

Until #103599 gets resolved (one way or another), the common "pattern" for case insensitive filters is to use to_upper/to_lower against a given value, in order to preserve the filtering performance (and not convert it into a full scan):

...
| WHERE  TO_UPPER(string_a) == "String"	// this will never match since the value contains lower case chars
| WHERE  TO_LOWER(string_b) == "abc"      // rewritten as a case-insensitive term query
...

One way to achieve this is to identify the to_lower/to_upper == "value" pattern and replace it with InsensitiveEquals operator which can then be:

  • either pushed down
  • translated into a dedicated operator

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions