HyukjinKwon commented on code in PR #41947:
URL: https://github.com/apache/spark/pull/41947#discussion_r1261940449


##########
python/pyspark/testing/utils.py:
##########
@@ -234,14 +240,24 @@ def assertDataFrameEqual(df: DataFrame, expected: 
DataFrame, check_row_order: bo
     ----------
     df : DataFrame
         The DataFrame that is being compared or tested.
-
     expected : DataFrame
         The expected result of the operation, for comparison with the actual 
result.
-
     check_row_order : bool, optional
         A flag indicating whether the order of rows should be considered in 
the comparison.
         If set to `False` (default), the row order is not taken into account.
         If set to `True`, the order of rows is important and will be checked 
during comparison.
+    rtol : float, optional
+        The relative tolerance, used in asserting approximate equality for 
float values in df
+        and expected. Set to 1e-5 by default. (See Notes)
+    atol : float, optional
+        The absolute tolerance, used in asserting approximate equality for 
float values in df
+        and expected. Set to 1e-8 by default. (See Notes)
+
+    Notes
+    -----
+    If the following equation is True for two float values a and b, then they 
are approximately
+    equal.
+    :math: absolute(a - b) <= (atol + rtol * absolute(b))

Review Comment:
   ```suggestion
       equal. ``absolute(a - b) <= (atol + rtol * absolute(b))``.
   ```



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