MCPcopy Create free account
hub / github.com/apache/arrow / test_hash_agg_empty

Function test_hash_agg_empty

python/pyarrow/tests/test_udf.py:823–832  ·  view source on GitHub ↗
(unary_agg_func_fixture)

Source from the content-addressed store, hash-verified

821
822@pytest.mark.numpy
823def test_hash_agg_empty(unary_agg_func_fixture):
824 arr1 = pa.array([], pa.float64())
825 arr2 = pa.array([], pa.int32())
826 table = pa.table([arr2, arr1], names=["id", "value"])
827
828 result = table.group_by("id").aggregate([("value", "mean_udf")])
829 expected = pa.table([pa.array([], pa.int32()), pa.array(
830 [], pa.float64())], names=['id', 'value_mean_udf'])
831
832 assert result == expected
833
834
835def test_hash_agg_wrong_output_dtype(wrong_output_dtype_agg_func_fixture):

Callers

nothing calls this directly

Calls 2

aggregateMethod · 0.80
arrayMethod · 0.45

Tested by

no test coverage detected