Unverified Commit 803c8d83 authored by ZackYoung's avatar ZackYoung Committed by GitHub

[fix][udf]修复udf逻辑遗留问题 (#1174)

* 因为之前udf 开发逻辑遗留问题,导致其他任务添加savepoint变null.null

* 因为之前udf 开发逻辑遗留问题,导致其他任务添加savepoint变null.null

* 更新sql模板语句
parent 0459b324
...@@ -64,6 +64,13 @@ public class UDFServiceImpl implements UDFService { ...@@ -64,6 +64,13 @@ public class UDFServiceImpl implements UDFService {
@Resource @Resource
TaskService taskService; TaskService taskService;
/**
* init udf
*
* @param statement sql 语句
* @param gatewayType flink gateway类型
* @return {@link UDFPath}
*/
@Override @Override
public UDFPath initUDF(String statement, GatewayType gatewayType) { public UDFPath initUDF(String statement, GatewayType gatewayType) {
if (gatewayType == GatewayType.KUBERNETES_APPLICATION) { if (gatewayType == GatewayType.KUBERNETES_APPLICATION) {
......
...@@ -71,4 +71,3 @@ VALUES (4, 'python_udf_1', 'Python', 'UDF', 'from pyflink.table import ScalarFun ...@@ -71,4 +71,3 @@ VALUES (4, 'python_udf_1', 'Python', 'UDF', 'from pyflink.table import ScalarFun
INSERT INTO `dlink_udf_template` (`id`, `name`, `code_type`, `function_type`, `template_code`, `enabled`, `create_time`, `update_time`) INSERT INTO `dlink_udf_template` (`id`, `name`, `code_type`, `function_type`, `template_code`, `enabled`, `create_time`, `update_time`)
VALUES (5, 'python_udf_2', 'Python', 'UDF', 'from pyflink.table import DataTypes\nfrom pyflink.table.udf import udf\n\n@udf(result_type=DataTypes.STRING())\ndef ${className}(variable1:string):\n return \'\'', NULL, '2022-10-25 09:25:13', '2022-10-25 09:34:47'); VALUES (5, 'python_udf_2', 'Python', 'UDF', 'from pyflink.table import DataTypes\nfrom pyflink.table.udf import udf\n\n@udf(result_type=DataTypes.STRING())\ndef ${className}(variable1:string):\n return \'\'', NULL, '2022-10-25 09:25:13', '2022-10-25 09:34:47');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment