Dear Arrow Devs,

I wonder if there is a nice way to do function chaining / math formular
with Arrow compute? (Either Python or C++?)

To give an example, let say I have three arrays a, x and y and want to
compute:

x * (1 - a) + y * a

Right now I can do this in pyarrow but pretty hard to read:

from pyarrow.compute import add, subtract, multiply

result = add(multiply(x, subtract(1, a)), multiply(y, a))

And it is probably harder to do this in C++ because the Result<Datum>
return type.

I wonder if there is a better way to do this kind of computation?

Thank you,
Li

Reply via email to