asubiotto opened a new pull request, #27402:
URL: https://github.com/apache/datafusion/pull/27402

   ## Which issue does this PR close?
   
   - Closes #27376.
   
   ## Rationale for this change
   
   `LIKE`/`ILIKE` on run-end encoded Utf8 columns casts them to `Utf8`, which 
expands every run. Dictionary-encoded Utf8 columns already skip this cast. With 
apache/arrow-rs#12154 the Arrow kernels match each run once, so run-end encoded 
columns can skip the cast too.
   
   Draft until apache/arrow-rs#12154 merges and DataFusion upgrades to an Arrow 
release that includes it.
   
   ## What changes are included in this PR?
   
   Type coercion and `LikeExpr` keep an outer `RunEndEncoded` over `Utf8` or 
`Dictionary(_, Utf8)` uncast when the pattern coerces to `Utf8`. Arrow requires 
the pattern to have the same type as the values. Other layouts and `SIMILAR TO` 
still cast.
   
   ## What is the testing strategy for this PR?
   
   New cases in `regexp/regexp_like.slt` check results and plans for LIKE/ILIKE 
on `REE<Utf8>` and `REE<Dictionary<Int32, Utf8>>`, and check that other layouts 
still cast.
   
   ## Are there any user-facing changes?
   
   No. Plans for these columns no longer show a `CAST`.
   
   AI assistance was used for this PR. I reviewed the whole change before 
opening it.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to