You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhengruifeng (via GitHub)" <gi...@apache.org> on 2026/07/22 02:51:13 UTC

[PR] [PS] Use native functions for NumPy math ufuncs [spark]

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

   ### What changes were proposed in this pull request?
   
   Replace the scalar pandas UDF mappings for NumPy `cosh`, `deg2rad`, `log2`, `rad2deg`, `sinh`, and `tanh` on pandas-on-Spark objects with their native Spark SQL function counterparts.
   
   Add end-to-end pandas-on-Spark coverage that compares every mapped NumPy ufunc result with pandas.
   
   ### Why are the changes needed?
   
   These mappings originated before the corresponding native Spark SQL functions were available. Current Spark provides the native functions, including Spark Connect support, so this removes the Python worker boundary while preserving NumPy-compatible results.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   - Added end-to-end pandas-on-Spark coverage for all six mappings.
   - Ran `git diff --check`.
   - Runtime tests were not run locally.
   
   ### 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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-58249][PS] Use native functions for NumPy math ufuncs [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on PR #57417:
URL: https://github.com/apache/spark/pull/57417#issuecomment-5045414514

   **Merge Summary:**
   - merged into master https://github.com/apache/spark/commit/31f58da0bca5f9a6340d7fab0f2565f0f8f2140a
   - merged into branch-4.x https://github.com/apache/spark/commit/e0c8b1283601aa707ae824dcb949b950ad9483d0
   
   *Posted by `merge_spark_pr.py`*


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-58249][PS] Use native functions for NumPy math ufuncs [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng closed pull request #57417: [SPARK-58249][PS] Use native functions for NumPy math ufuncs
URL: https://github.com/apache/spark/pull/57417


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org