You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Weston Pace (Jira)" <ji...@apache.org> on 2022/05/05 02:44:00 UTC
[jira] [Created] (ARROW-16475) [Python] Publically expose Expression._call
Weston Pace created ARROW-16475:
-----------------------------------
Summary: [Python] Publically expose Expression._call
Key: ARROW-16475
URL: https://issues.apache.org/jira/browse/ARROW-16475
Project: Apache Arrow
Issue Type: Improvement
Components: Python
Reporter: Weston Pace
When writing a projection expression I can write something clean when using the builtin functions:
{noformat}
dataset.to_table(columns={'projected': pc.ascii_upper(ds.field('name'))})
{noformat}
However, if I am using a custom function (UDF) then there isn't a great solution today that I can find. The best I can come up with is:
{noformat}
dataset.to_table(columns={'projected': pc.Expression._call('my_udf', [ds.field('name')])})
{noformat}
I'd think one approach could be:
{noformat}
dataset.to_table(columns={'projected': pc.call('my_udf', [ds.field('name')])})
{noformat}
However, I'm open to other suggestions as well.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)