From ae29426735b1943df96842308fb03ca350fdba74 Mon Sep 17 00:00:00 2001 From: Matt Green Date: Mon, 23 Sep 2024 09:22:13 -0700 Subject: [PATCH] rename example file --- .../python/examples/{udf.py => udf_example.py} | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) rename py-denormalized/python/examples/{udf.py => udf_example.py} (92%) diff --git a/py-denormalized/python/examples/udf.py b/py-denormalized/python/examples/udf_example.py similarity index 92% rename from py-denormalized/python/examples/udf.py rename to py-denormalized/python/examples/udf_example.py index 0b1bf91..563bd99 100644 --- a/py-denormalized/python/examples/udf.py +++ b/py-denormalized/python/examples/udf_example.py @@ -25,18 +25,14 @@ def signal_handler(sig, frame): "reading": 0.0, } - -def gt(array: pa.Scalar, v: pa.Array) -> pa.Array: - return pc.greater(array, v) - +def gt(lhs: pa.Array, rhs: pa.Scalar) -> pa.Array: + return pc.greater(lhs, rhs) greater_than_udf = udf(gt, [pa.float64(), pa.float64()], pa.bool_(), "stable") - def sample_sink_func(rb: pa.RecordBatch): if not len(rb): return - print("==") print(rb)