You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/08/09 14:12:37 UTC

[GitHub] [spark] zhengruifeng commented on a diff in pull request #37449: [SPARK-39734][SPARK-36259][SPARK-39733][SPARK-37348][PYTHON] Functions Parity between PySpark and SQL

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


##########
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:
   done. thanks!



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

Review Comment:
   updated!



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