Skip to content

[FEA] Support ILIKE (case-insensitive LIKE) in the expression evaluator #2

Description

@rishitesh

SQL ILIKE is already recognized by the Substrait parser (from_substrait.cpp maps ilike to like_expression with ignore_case = true, and ignore_case round-trips through RPC serialization), but the executor doesn't handle it: evaluate_expressions in src/executor/eval.cpp only implements the case-sensitive path, so any query with ILIKE fails with "Unsupported scalar function".

Proposal: implement it in the like case of eval.cpp by lowercasing the input column, the pattern, and the escape character with cudf::strings::to_lower (so all three share the same case mapping, including non-ASCII), then reusing both existing LIKE paths (gqe::like shift-and kernel and the cudf::strings::like fallback). % and _ have no case, so the pattern structure is preserved.

I have this implemented with unit tests (wildcards, nullable input, escape characters, UTF-8, plus a control test that plain LIKE stays case-sensitive), verified on an L4: the eval_expressions suite passes through both execution paths, the full ctest suite shows no regressions, and end-to-end queries through gqe_node_manager + gqe-cli return correct results.

Per the contributing guide, opening this for discussion before submitting the PR — happy to adjust the approach if the team prefers a different design (e.g., a case-insensitive kernel instead of the to_lower normalization).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions