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

Function sum_agg_func_fixture

python/pyarrow/tests/test_udf.py:51–69  ·  view source on GitHub ↗

Register a unary aggregate function (mean)

()

Source from the content-addressed store, hash-verified

49
50@pytest.fixture(scope="session")
51def sum_agg_func_fixture():
52 """
53 Register a unary aggregate function (mean)
54 """
55 def func(ctx, x, *args):
56 return pa.scalar(np.nansum(x))
57
58 func_name = "sum_udf"
59 func_doc = empty_udf_doc
60
61 pc.register_aggregate_function(func,
62 func_name,
63 func_doc,
64 {
65 "x": pa.float64(),
66 },
67 pa.float64()
68 )
69 return func, func_name
70
71
72@pytest.fixture(scope="session")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected