Is there a way to get all flink build-in SQL functions

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there a way to get all flink build-in SQL functions

yinhua.dai
I would like to put this list to the our self service flink SQL web UI.
Thanks.



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to get all flink build-in SQL functions

Chesnay Schepler
Beyond the documentation I don't believe there to be a mechanism for listing all built-in functions.

On 23.01.2019 04:30, yinhua.dai wrote:
I would like to put this list to the our self service flink SQL web UI.
Thanks.



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/


Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to get all flink build-in SQL functions

Hequn Cheng
Hi yinhua,

As Chesnay suggest, document is a good way. You can find descriptions and example for each udf.
If you only want to get a list of name, you can also take a look at the flink code(i.e., the BasicOperatorTable.builtInSqlOperators).

Hope this helps.
Best, Hequn

On Thu, Jan 24, 2019 at 4:34 PM Chesnay Schepler <[hidden email]> wrote:
Beyond the documentation I don't believe there to be a mechanism for listing all built-in functions.

On 23.01.2019 04:30, yinhua.dai wrote:
I would like to put this list to the our self service flink SQL web UI.
Thanks.



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/


Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to get all flink build-in SQL functions

yinhua.dai
Thanks Guys.
I just wondering if there is another way except hard code the list:)
Thanks anyway.



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to get all flink build-in SQL functions

Jeff Zhang
I believe it make sense to list available udf programmatically. e.g. Users may want to see available udfs in sql-client. It would also benefit other downstream project that use flink sql. Besides that I think flink should also provide api for querying the description of udf about how to use it. 

yinhua.dai <[hidden email]> 于2019年1月25日周五 下午5:12写道:
Thanks Guys.
I just wondering if there is another way except hard code the list:)
Thanks anyway.



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/


--
Best Regards

Jeff Zhang
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to get all flink build-in SQL functions

Timo Walther
The problem right now is that Flink SQL has two stacks for defining functions. One is the built-in function stack that is based on Calcite and the other are the registered UDFs.

What you can do is to use FunctionCatalog.withBuiltIns.getSqlOperatorTable() for listing Calcite built-in functions and TableEnvironment.listFunctions() for registered UDFs.

I hope this helps.

Regards,
Timo

Am 25.01.19 um 10:17 schrieb Jeff Zhang:
I believe it make sense to list available udf programmatically. e.g. Users may want to see available udfs in sql-client. It would also benefit other downstream project that use flink sql. Besides that I think flink should also provide api for querying the description of udf about how to use it. 

yinhua.dai <[hidden email]> 于2019年1月25日周五 下午5:12写道:
Thanks Guys.
I just wondering if there is another way except hard code the list:)
Thanks anyway.



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/


--
Best Regards

Jeff Zhang