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

Function binary_func_fixture

python/pyarrow/tests/test_udf.py:131–148  ·  view source on GitHub ↗

Register a binary scalar function.

()

Source from the content-addressed store, hash-verified

129
130@pytest.fixture(scope="session")
131def binary_func_fixture():
132 """
133 Register a binary scalar function.
134 """
135 def binary_function(ctx, m, x):
136 return pc.call_function("multiply", [m, x],
137 memory_pool=ctx.memory_pool)
138 func_name = "y=mx"
139 binary_doc = {"summary": "y=mx",
140 "description": "find y from y = mx"}
141 pc.register_scalar_function(binary_function,
142 func_name,
143 binary_doc,
144 {"m": pa.int64(),
145 "x": pa.int64(),
146 },
147 pa.int64())
148 return binary_function, func_name
149
150
151@pytest.fixture(scope="session")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected