marcuslin123 opened a new pull request, #58374:
URL: https://github.com/apache/spark/pull/58374

   ### What changes were proposed in this pull request?
   
   This PR changes the `prefix%suffix` branch of `LikeSimplification` to use
   `OctetLength` with the UTF-8 byte lengths of the prefix and suffix. It also
   updates the optimizer plan tests and adds SPARK-59063 coverage for multibyte
   UTF-8 characters.
   
   ### Why are the changes needed?
   
   `Length` scans every input string to count code points. `OctetLength` reads 
the
   stored UTF-8 byte length in constant time, while the existing `StartsWith` 
and
   `EndsWith` predicates continue to enforce the pattern boundaries.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   ```
   build/sbt catalyst/scalastyle catalyst/Test/scalastyle \
     'catalyst/testOnly 
org.apache.spark.sql.catalyst.optimizer.LikeSimplificationSuite'
   ```
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Codex (GPT-5) for code assistance.
   


-- 
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