pytorch / torcharrow

High performance model preprocessing library on PyTorch

Home Page:https://pytorch.org/torcharrow/beta/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Making BaseColumn::genericUnaryUDF and the family free functions

OswinC opened this issue · comments

BaseColumn::genericUnaryUDF
BaseColumn::genericBinaryUDF
BaseColumn::genericTrinaryUDF

https://github.com/facebookresearch/torcharrow/blob/main/csrc/velox/column.h#L364-L377

This is in the Eager Mode/Velox Backend.

The generic UDF call methods should be general enough to not be bound to any columns. For example when there are no arguments or all arguments are scalars, conceptually this call is not bound to any columns. Technically they are static functions so don't require users to bind the calls to any column, but having these functions in the BaseColumn class makes them "sound" like being bound to BaseColumn. This is mostly a cosmetic change for new joiners to start with. More work will be required to truly make a UDF call interface that allows any forms of inputs.

Let's move these functions out of the BaseColumn class and make them free