rbc
rbc copied to clipboard
Attach table info to Column inputs of UDTFs
Something like the following should work
@omnisci('int32(Column<double>, Column<double>, RowMultiplier, OutputColumn<double>)')
def foo(x, y, m, z):
if x.table_id == y.table_id:
# do something
else:
# do something different
<return z size>
Risks:
- the above makes sense for queries like
but does it for queries likeselect * from table(foo(mytable.x, mytable.y, 1))
where the table info may get lost due to usage ofselect * from table(foo(cursor(select x, y from mytable), 1)) select * from table(foo(cursor(select x from mytable), cursor(select x from mytable2), 1))
cursor
or when the input column is an output of another UDTF?