You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "westonpace (via GitHub)" <gi...@apache.org> on 2023/01/26 13:28:24 UTC
[GitHub] [arrow] westonpace opened a new issue, #33883: [Python] Adopt a more pythonic method for UDF registration
westonpace opened a new issue, #33883:
URL: https://github.com/apache/arrow/issues/33883
### Describe the enhancement requested
It's currently quite complicated to register a UDF. In a recent PR we reviewed a few different suggestions. We should adopt one of these.
### Component(s)
Python
--
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: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Python] Adopt a more pythonic method for UDF registration [arrow]
Posted by "dangotbanned (via GitHub)" <gi...@apache.org>.
dangotbanned commented on issue #33883:
URL: https://github.com/apache/arrow/issues/33883#issuecomment-3349274695
We could definitely benefit from this and/or #31612 in https://github.com/narwhals-dev/narwhals
### Related
- https://github.com/narwhals-dev/narwhals/pull/3143
- https://github.com/narwhals-dev/narwhals/issues/2385
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Python] Adopt a more pythonic method for UDF registration [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #33883:
URL: https://github.com/apache/arrow/issues/33883#issuecomment-5910141152
This issue has been marked as stale because it has had no activity in the past 365 days. Please remove the stale label or comment below, or this issue will be closed in 14 days. If this improvement is still desired but has no current owner, please add the 'Status: needs champion' label.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] westonpace commented on issue #33883: [Python] Adopt a more pythonic method for UDF registration
Posted by "westonpace (via GitHub)" <gi...@apache.org>.
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Python] Adopt a more pythonic method for UDF registration [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #33883: [Python] Adopt a more pythonic method for UDF registration
URL: https://github.com/apache/arrow/issues/33883
--
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: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org