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

   ### What changes were proposed in this pull request?
   
   Fix pandas-on-Spark `np.maximum` and `np.minimum` to propagate missing 
values consistently with NumPy.
   
   Spark's `greatest` and `least` can skip SQL NULL values, and `least` can 
return a finite value when another operand is a runtime-generated NaN.
   
   The fix introduces dedicated functions that propagate NULL and NaN by 
returning the original operand, preserving integer precision and result types.
   
   ### Why are the changes needed?
   
   Previously, `np.maximum` could return `-1.0` instead of NaN for imported 
missing values. Similarly, `np.minimum` could return `-1.0` instead of NaN 
generated by `np.cos(np.inf)`.
   
   ### How was this patch tested?
   
   - Added regression tests for imported NaN and runtime-generated NaN.
   - Verified integer precision beyond 2^53.
   - Focused unittest passed.
   - `git diff --check` passed.
   
   Closes SPARK-60656.


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