HyukjinKwon commented on code in PR #51275:
URL: https://github.com/apache/spark/pull/51275#discussion_r2176485440
##########
python/pyspark/pandas/tests/computation/test_binary_ops.py:
##########
@@ -225,11 +225,12 @@ def test_binary_operator_floordiv(self):
def test_binary_operator_mod(self):
# Positive
- pdf = pd.DataFrame({"a": [3], "b": [2]})
+ pdf = pd.DataFrame({"a": [3], "b": [2], "c": [0]})
Review Comment:
Seems like this change broke the non ANSI mode:
```
======================================================================
ERROR [4.586s]: test_binary_operator_mod
(pyspark.pandas.tests.computation.test_binary_ops.FrameBinaryOpsTests.test_binary_operator_mod)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/__w/spark/spark/python/pyspark/pandas/tests/computation/test_binary_ops.py",
line 233, in test_binary_operator_mod
self.assert_eq(1 % psdf["c"], 1 % pdf["c"])
~~^~~~~~~~~~~
File "/__w/spark/spark/python/pyspark/pandas/base.py", line 386, in
__rmod__
return self._dtype_op.rmod(self, other)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/__w/spark/spark/python/pyspark/pandas/data_type_ops/num_ops.py",
line 177, in rmod
return column_op(safe_rmod)(left, right)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/__w/spark/spark/python/pyspark/pandas/base.py", line 222, in wrapper
scol = f(
^^
File "/__w/spark/spark/python/pyspark/pandas/data_type_ops/num_ops.py",
line 175, in safe_rmod
return ((right % left) + left) % left
~~~~~~^~~~~~
File "/__w/spark/spark/python/pyspark/pandas/base.py", line 386, in
__rmod__
return self._dtype_op.rmod(self, other)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/__w/spark/spark/python/pyspark/pandas/data_type_ops/num_ops.py",
line 177, in rmod
return column_op(safe_rmod)(left, right)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/__w/spark/spark/python/pyspark/pandas/base.py", line 222, in wrapper
scol = f(
^^
File "/__w/spark/spark/python/pyspark/pandas/data_type_ops/num_ops.py",
line 175, in safe_rmod
return ((right % left) + left) % left
~~~~~~^~~~~~
File "/__w/spark/spark/python/pyspark/pandas/base.py", line 386, in
__rmod__
return self._dtype_op.rmod(self, other)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/__w/spark/spark/python/pyspark/pandas/data_type_ops/num_ops.py",
line 177, in rmod
return column_op(safe_rmod)(left, right)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/__w/spark/spark/python/pyspark/pandas/base.py", line 222, in wrapper
scol = f(
^^
```
https://github.com/apache/spark/actions/runs/15987607479/job/45094971366
Let me revert it for now.
--
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]