-
Notifications
You must be signed in to change notification settings - Fork 797
Open
Labels
good first issueCategory: good first issueCategory: good first issuestaleIssue has not had recent activity or appears to be solved. Stale issues will be automatically closedIssue has not had recent activity or appears to be solved. Stale issues will be automatically closed
Description
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
Metadata
Metadata
Assignees
Labels
good first issueCategory: good first issueCategory: good first issuestaleIssue has not had recent activity or appears to be solved. Stale issues will be automatically closedIssue has not had recent activity or appears to be solved. Stale issues will be automatically closed