westonpace commented on issue #33883: URL: https://github.com/apache/arrow/issues/33883#issuecomment-1405009345
I think [this suggestion](https://github.com/apache/arrow/pull/14320#issuecomment-1372473478), from @pitrou , is rather compelling: ``` udf = pc.register_scalar_function( name="y=x*2", arg_names=["x"], doc = {"summary": "multiply by two function", "description": "test multiply function"} ) for in_type in [pa.int64(), pa.float64()]: udf.add_kernel([in_type], in_type, impl) udf = pc.register_scalar_function( name="y=x*2", arg_names=["x"], doc = {"summary": "multiply by two function", "description": "test multiply function"} ) @udf.kernel([pa.float64()], pa.float64()) @udf.kernel([pa.int64()], pa.int64()) def impl(ctx, x): # ... ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
