rbc icon indicating copy to clipboard operation
rbc copied to clipboard

Attach table info to Column inputs of UDTFs

Open pearu opened this issue 4 years ago • 0 comments

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
    select * from table(foo(mytable.x, mytable.y, 1))
    
    but does it for queries like
    select * 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))
    
    where the table info may get lost due to usage of cursor or when the input column is an output of another UDTF?

pearu avatar Sep 10 '20 19:09 pearu