Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
icexelloss committed Jul 17, 2023
1 parent 408dc7e commit 6473fed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions python/pyarrow/_compute.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2861,9 +2861,9 @@ def register_vector_function(func, function_name, function_doc, in_types, out_ty
>>> answer
<pyarrow.lib.DoubleArray object at ...>
[
0.3333333333333333,
0.6666666666666666,
1
0.3333333333333333,
0.6666666666666666,
1
]
"""
return _register_user_defined_function(get_register_vector_function(),
Expand Down
4 changes: 2 additions & 2 deletions python/pyarrow/tests/test_udf.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,15 +841,15 @@ def test_hash_agg_random(sum_agg_func_fixture):
def test_vector_basic(unary_vector_func_fixture):
arr = pa.array([10.0, 20.0, 30.0, 40.0, 50.0], pa.float64())
result = pc.call_function("y=pct_rank(x)", [arr])
expected = unary_vector_func_fixture(None, arr)
expected = unary_vector_func_fixture[0](None, arr)
assert result == expected


@pytest.mark.pandas
def test_vector_empty(unary_vector_func_fixture):
arr = pa.array([1], pa.float64())
result = pc.call_function("y=pct_rank(x)", [arr])
expected = unary_vector_func_fixture(None, arr)
expected = unary_vector_func_fixture[0](None, arr)
assert result == expected


Expand Down

0 comments on commit 6473fed

Please sign in to comment.