Peter Nguyen created SPARK-52563:
------------------------------------
Summary: _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
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]