tadeja commented on PR #48914:
URL: https://github.com/apache/arrow/pull/48914#issuecomment-5530816452

   Ah! it would be beneficial to add a Python test, perhaps like this
   (thanks, @rok, for the reminder)
   
   ```diff
   diff --git a/python/pyarrow/tests/test_compute.py 
b/python/pyarrow/tests/test_compute.py
   --- a/python/pyarrow/tests/test_compute.py
   +++ b/python/pyarrow/tests/test_compute.py
   @@ -1944,6 +1944,18 @@ def test_arithmetic_multiply():
        assert result.equals(expected)
    
    
   +def test_arithmetic_remainder_modulo():
   +    left = pa.array([7, -7, 7, -7, None])
   +    right = pa.array([3, 3, -3, -3, 3])
   +    expected_remainder = [1, -1, 1, -1, None]
   +    expected_modulo = [1, 2, -2, -1, None]
   +
   +    assert pc.remainder(left, right).to_pylist() == expected_remainder
   +    assert pc.remainder_checked(left, right).to_pylist() == 
expected_remainder
   +    assert pc.modulo(left, right).to_pylist() == expected_modulo
   +    assert pc.modulo_checked(left, right).to_pylist() == expected_modulo
   +
   +
    @pytest.mark.parametrize("ty", ["round", "round_to_multiple"])
    def test_round_to_integer(ty):
   ```


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

Reply via email to