aray commented on code in PR #37449:
URL: https://github.com/apache/spark/pull/37449#discussion_r941273835


##########
python/pyspark/sql/functions.py:
##########
@@ -1077,6 +1077,35 @@ def pow(col1: Union["ColumnOrName", float], col2: 
Union["ColumnOrName", float])
     return _invoke_binary_math_function("pow", col1, col2)
 
 
+def pmod(dividend: Union["ColumnOrName", float], divisor: 
Union["ColumnOrName", float]) -> Column:
+    """
+    Returns the positive value of dividend mod divisor.
+
+    .. versionadded:: 3.4.0
+
+    Examples
+    --------
+    >>> df = spark.createDataFrame([
+    ...     (1.0, float('nan')), (float('nan'), 2.0),
+    ...     (float('nan'), float('nan')), (-3.0, 4.0),
+    ...      (-5.0, -6.0), (7.0, -8.0), (1.0, 2.0)],

Review Comment:
   These are all good examples but it would be good to also have examples where 
|dividend| > divisor > 0 as that is normal usage of this function. 



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