Support ILIKE in the expression evaluator - #3
Closed
rishitesh wants to merge 2 commits into
Closed
Conversation
ILIKE was parsed but not evaluated. Lowercase the input column, pattern, and escape char with cudf::strings::to_lower, then reuse the existing LIKE paths. Add tests for both execution paths. Signed-off-by: Rishitesh Mishra <rishi80.mishra@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2.
ILIKEwas already parsed (from_substrait.cppsetsignore_caseonlike_expression, and it round-trips through RPC serialization), butevaluate_expressionsthrew "Unsupported scalar function" when evaluating it.Changes
src/executor/eval.cpp: in thelikecase, whenignore_case()is set, lowercase the input column, the pattern, and the escape character withcudf::strings::to_lower, then reuse the existing LIKE paths (gqe::likeshift-and kernel and thecudf::strings::likefallback). Pattern and escape char are lowered through the same cuDF kernel as the column so their case mappings agree, including for non-ASCII input.%and_have no case, so the pattern structure is preserved.test/executor/eval_expressions_test.cpp: 6 new tests — basic mixed-case matching,_/%wildcards, nullable input, escape characters, UTF-8 (Ärger), and a control test that plainLIKEremains case-sensitive. All run through both execution paths via the existing parameterized suite (filter_use_like_shift_andfalse/true).Testing
On an L4 (sm_89), Release build:
ctest -R eval_expressionspasses; the 12 new parameterized cases all pass.ctestshows no regressions vsmain(thecupti_testNVTX case andmemory_resourcefailures reproduce identically on unmodifiedmainin my container environment).gqe_node_manager+gqe-cli:ILIKEqueries against a mixed-case Parquet table return the expected rows, cross-checked against a Python reference.One note from e2e testing: patterns not anchored by
%(e.g.ILIKE 'w_dget') return incorrect results on the shift-and path — but this reproduces with plainLIKEonmainas well, so it's a pre-existing kernel issue rather than something introduced here — filed as #4 with the repro and root cause.