[
https://issues.apache.org/jira/browse/FLINK-37322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
tianyuan updated FLINK-37322:
-----------------------------
Component/s: Table SQL / API
> surport eval groovy scripts udf for flink sql
> ---------------------------------------------
>
> Key: FLINK-37322
> URL: https://issues.apache.org/jira/browse/FLINK-37322
> Project: Flink
> Issue Type: New Feature
> Components: Table SQL / API
> Reporter: tianyuan
> Priority: Major
>
> I want to add a new UDF to dynamically execute Groovy scripts to achieve any
> desired functions.
> Just like using Lua scripts in Redis. I have implemented this UDF locally,
> which has very efficient execution performance and strong flexibility. Usage
> is as follows:
> select eval_groovy_script('INT', 'return arg0+arg1', 1, 2);
> select eval_groovy_script('INT', 'return p1+p2', MAP['p1', 2, 'p2', 5]);
> select eval_groovy_script('MAP<STRING,STRING>', 'return ["TopicName" :
> "Lists", "Author" : "Raghav"] ');
> This udf requires the following three parameters:
> 1. Data return type
> 2. Groovy script
> 3. Parameters passed to the groovy script. If it is a variable type, use the
> variable in the groovy script through arg\{index}. If it is a map type, you
> can use the variable through the key in the groovy script.
> Apache pinot has implemented similar functions:
> https://docs.pinot.apache.org/users/user-guide-query/scalar-functions
> I hope a committer will recognize my idea and assign this task to me.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)