zhengruifeng opened a new pull request, #57780: URL: https://github.com/apache/spark/pull/57780
### What changes were proposed in this pull request? Replaces the pandas UDF used for `np.ldexp` in the pandas API on Spark with the native Spark SQL expression `x * pow(2.0, exp)`. Adds coverage for finite values, infinities, NaN, signed zero, and exponent overflow and underflow. ### Why are the changes needed? Using native Spark expressions avoids pandas UDF serialization and lets Spark optimize and code-generate this operation while preserving NumPy-compatible behavior. ### Does this PR introduce _any_ user-facing change? No. This is a behavior-preserving implementation change. ### How was this patch tested? `source ~/.zshrc && conda run -n spark-dev-313 python/run-tests --testnames pyspark.pandas.tests.test_numpy_compat.NumPyCompatTests.test_np_ldexp` ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Codex (GPT-5) -- 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]
