-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Closed
Labels
Description
It would be great if we could create user defined functions in ClickHouse. I don't know whether it has C++ API for that but a high level language such as V8 for Lua would be better since they allow us to create functions in runtime similar to PL/pgSQL and PL/SQL.
Since ClickHouse is an analytical database, users will want to perform complex analytical queries such as funnel and retention and implementing them in ANSI SQL (with joins, CTEs etc.) is quite inefficient. UDFs would help us to avoid expensive JOINS so it would be a huge win.
UDFs can be created using CREATE FUNCTION syntax similar to this one:
CREATE FUNCTION dummy_func() RETURNS int8 AS '
return 1;
' LANGUAGE V8;
Implementing aggregate functions may be harder than scalar functions but even the support for scalar functions would be great.
Reactions are currently unavailable