flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fabian Hueske (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-7151) FLINK SQL support create temporary function and table
Date Wed, 12 Jul 2017 13:25:00 GMT

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

Fabian Hueske commented on FLINK-7151:

Actually, functions are not registered per job but per {{TableEnvironment}}. So you could
run multiple queries on using the same {{TableEnvironment}}.
Right now there is no way to save or restore a {{TableEnvironment}}. 

Registering functions to an external catalog and connecting the catalog to the {{TableEnvironment}}
sounds like a good idea.

> 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

View raw message