jorisvandenbossche commented on PR #13099:
URL: https://github.com/apache/arrow/pull/13099#issuecomment-1121214926
It is already supported to call compute functions directly on expressions,
eg:
```
In [28]: pc.multiply(pc.field('a'), pc.field('b'))
Out[28]: <pyarrow.compute.Expression multiply(a, b)>
```
Now, it seems this is then limited to requiring all expressions as input, so
combining a field with scalar raises:
```
In [31]: pc.multiply(pc.field('a'), 10)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-31-099e12fd5ce6> in <module>
----> 1 pc.multiply(pc.field('a'), 10)
~/scipy/repos/arrow/python/pyarrow/compute.py in wrapper(memory_pool, *args)
233 )
234 if args and isinstance(args[0], Expression):
--> 235 return Expression._call(func_name, list(args))
236 return func.call(args, None, memory_pool)
237 else:
~/scipy/repos/arrow/python/pyarrow/_compute.pyx in
pyarrow._compute.Expression._call()
TypeError: only other expressions allowed as arguments
```
But we can probably improve that, instead of adding the `apply` method?
--
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]