[ 
https://issues.apache.org/jira/browse/FLINK-7151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16083845#comment-16083845
 ] 

yuemeng commented on FLINK-7151:
--------------------------------

[~jark]
yes,extend the ExternalCatalog to support register external functions is a very 
good way ,i think,maybe we can register a function use sql ddl instead of api
here some questions:
1) all buitin function in flink will be register to shcema each job cycle.it's 
a ugly way
2) agg function such as sum,avg should matched by calcite,we can directly get 
the exact function by aggCall instead of hard code


> FLINK SQL support create temporary function and table
> -----------------------------------------------------
>
>                 Key: FLINK-7151
>                 URL: https://issues.apache.org/jira/browse/FLINK-7151
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API & SQL
>            Reporter: yuemeng
>
> Based on create temporary function and table.we can register a udf,udaf,udtf 
> use sql:
> {code}
> CREATE TEMPORARY 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;
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to