You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2025/07/08 23:14:00 UTC

[jira] [Assigned] (SPARK-52563) _assert_pandas_almost_equal uses wrong var instead of parameters

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

Hyukjin Kwon reassigned SPARK-52563:
------------------------------------

    Assignee: Peter Nguyen

> _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
>            Assignee: 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org