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)

Reply via email to