holdenk opened a new pull request, #60684: URL: https://github.com/apache/spark/pull/60684
Backport-of: #59592 ### What changes were proposed in this pull request? Lower `s.upper()`, `s.lower()`, `s.startswith(p)`, and `s.endswith(p)` on string operands to the Catalyst functions of the same name, with the same NULL guard as `len()`. `startswith`/`endswith` also lower under `not`, `and`, and `or`. `p in s` comes in a follow-up. ### Why are the changes needed? Follow-up to SPARK-55214, so more simple string UDFs run in the JVM instead of a Python worker. ### Does this PR introduce _any_ user-facing change? No, results match interpreted Python and transpilation is experimental. ### How was this patch tested? New unit test in `test_udf_transpile_unit.py`, including sharp s and final sigma case mappings, NULL operands, and non-string fallback. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 5.5) Closes #59592 from guan404ming/SPARK-59816-transpile-string-methods. Authored-by: Guan-Ming Chiu <[email protected]> Signed-off-by: Holden Karau <[email protected]> (cherry picked from commit 7bb3a9486173213ee1dfeaef4351a074268670d8) Signed-off-by: Holden Karau <[email protected]> -- 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]
