Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
Based on create function and table.we can register a udf,udaf,udtf use sql:
CREATE FUNCTION [IF NOT EXISTS] [catalog_name.db_name.]function_name AS class_name; DROP FUNCTION [IF EXISTS] [catalog_name.db_name.]function_name; ALTER FUNCTION [IF EXISTS] [catalog_name.db_name.]function_name RENAME TO new_name;
CREATE function 'TOPK' AS 'com.xxxx.aggregate.udaf.distinctUdaf.topk.ITopKUDAF'; INSERT INTO db_sink SELECT id, TOPK(price, 5, 'DESC') FROM kafka_source GROUP BY id;
This ticket can assume that the function class is already loaded in classpath by users. Advanced syntax like to how to dynamically load udf libraries from external locations can be on a separate ticket.
Attachments
Issue Links
- blocks
-
FLINK-14055 Add advanced function DDL syntax "USING JAR"
- Closed
- is a child of
-
FLINK-10232 Add a SQL DDL
- Open
- is a parent of
-
FLINK-14711 Add Alter Function and Show Functions in SQL Parser
- Closed
- is blocked by
-
FLINK-14711 Add Alter Function and Show Functions in SQL Parser
- Closed
- relates to
-
FLINK-14837 Support Function DDL in TableEnvironment
- Reopened
- links to