[ 
https://issues.apache.org/jira/browse/SPARK-52563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated SPARK-52563:
-----------------------------------
    Labels: pull-request-available  (was: )

> _assert_pandas_almost_equal uses wrong var instead of parameters
> ----------------------------------------------------------------
>
>                 Key: SPARK-52563
>                 URL: https://issues.apache.org/jira/browse/SPARK-52563
>             Project: Spark
>          Issue Type: Bug
>          Components: Pandas API on Spark
>    Affects Versions: 3.5.0
>            Reporter: Peter Nguyen
>            Priority: Minor
>              Labels: pull-request-available
>
> Inside python/pyspark/testing/pandasutils.py, the below function uses the 
> variables lval and rval instead of the correct parameters val1 and val2.
> {code:java}
>     def compare_vals_approx(val1, val2):
>         # compare vals for approximate equality
>         if isinstance(lval, (float, decimal.Decimal)) or isinstance(rval, 
> (float, decimal.Decimal)):
>             if abs(float(lval) - float(rval)) > (atol + rtol * 
> abs(float(rval))):
>                 return False
>         elif val1 != val2:
>             return False {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to