This repository was archived by the owner on Nov 1, 2024. It is now read-only.

Description
When giving an UDF an unexpected/unsupported input type, the error msg is misleading. For example
import torcharrow as ta
from torcharrow import functional as F_eager
df = ta.dataframe(
{
"a": [x for x in range(5)],
"b": [100 * x for x in range(5)],
"label": [np.float32(x + 0.5) for x in range(5)],
"label_str": [str(np.float32(x + 0.5)) for x in range(5)],
}
)
print(F_eager.torcharrow_round(df["label"]))
print(F_eager.torcharrow_round(df["label_str"]))
The first one prints without any issue,
the second shows a
Request for unknown Velox UDF: torcharrow_round
since it doesn't expect a Column(str)
However, my first impression was to think that this method doesn't exist. Would be great if we could return something along the lines of "torcharrow_round exists, but only accepts int/floats/etc"