how to register a table function in SQL by create function ?
for example, expand_pairs
@udf(
input_types=["INT", "INT"],
result_type=[("left", "INT"), ("right", "INT"), ("sum", "INT")],
batch_mode=True,
)
def expand_pairs(left: List[int], right: List[int]):
return [
{"left": l, "right": r, "sum": l + r}
for l, r in zip(left, right)
]