Tabular SQL UDFs (UDTFs)
Summary
A user-defined table function can apply to a SQL query and returns 0, 1, or multi-rows, each result contains 1 or more columns. A snow style UDTFs:
create function sum_range_func(l int, r int)
returns table (x integer)
as 'select sum(a) from test where a > l and a < r'
;
select * from table(sum_range_func(1,9));
Reference: Databend scalar UDF: https://databend.rs/doc/reference/sql/ddl/udf/ddl-create-function Snowflake tabular UDF: https://docs.snowflake.com/en/developer-guide/udf/sql/udf-sql-tabular-functions.html
/assignme
@BohuTANG which parser should I use for this feature, v1 or v2?
@BohuTANG which parser should I use for this feature, v1 or v2?
Please use v2, v2 will enabled by default soon.
Hi @GrapeBaBa , How is this going or any questions?
@BohuTANG I am busy in own job these two weeks. I can spend some time to do this task from this week, however if it is a high priority task, feel free to take it back.