zhengruifeng commented on code in PR #57784:
URL: https://github.com/apache/spark/pull/57784#discussion_r3719517399


##########
python/pyspark/pandas/numpy_compat.py:
##########
@@ -116,7 +116,18 @@
     .otherwise(F.greatest(c1, c2))
     .cast("double"),
     "fmin": lambda c1, c2: F.least(c1, c2).cast("double"),
-    "fmod": pandas_udf(lambda s1, s2: np.fmod(s1, s2), DoubleType()),  # type: 
ignore[call-overload]
+    "fmod": lambda c1, c2: F.when(

Review Comment:
   Addressed in ebdec053470. Removed the incorrect null branch; the 
zero-divisor case now also requires a non-null dividend, so native remainder 
propagates nulls. Added nullable Int64 coverage, and the focused test passes.



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