Unverified Commit ca7795c1 authored by ZackYoung's avatar ZackYoung Committed by GitHub

[Optimize]Optimize github workflow pom (#1313)

* 更新profile * add udf_template sql
parent cbd41808
......@@ -98,7 +98,7 @@ jobs:
./mvnw -B clean install \
-Dmaven.test.skip=true \
-Dcheckstyle.skip=true \
-P prod,scala-2.12,flink-${{ matrix.flink }} \
-P prod,scala-2.12,flink-${{ matrix.flink }},maven-central \
--no-snapshot-updates
# 查看打包的大小
......
......@@ -940,6 +940,22 @@ CREATE TABLE `dlink_udf_template` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='udf template';
-- ----------------------------
-- Records of dlink_udf_template
-- ----------------------------
INSERT INTO `dlink_udf_template` (`id`, `name`, `code_type`, `function_type`, `template_code`, `enabled`, `create_time`, `update_time`)
VALUES (1, 'java_udf', 'Java', 'UDF', '${(package==\'\')?string(\'\',\'package \'+package+\';\')}\n\nimport org.apache.flink.table.functions.ScalarFunction;\n\npublic class ${className} extends ScalarFunction {\n public String eval(String s) {\n return null;\n }\n}', NULL, '2022-10-19 09:17:37', '2022-10-25 17:45:57');
INSERT INTO `dlink_udf_template` (`id`, `name`, `code_type`, `function_type`, `template_code`, `enabled`, `create_time`, `update_time`)
VALUES (2, 'java_udtf', 'Java', 'UDTF', '${(package==\'\')?string(\'\',\'package \'+package+\';\')}\n\nimport org.apache.flink.table.functions.ScalarFunction;\n\n@FunctionHint(output = @DataTypeHint(\"ROW<word STRING, length INT>\"))\npublic static class ${className} extends TableFunction<Row> {\n\n public void eval(String str) {\n for (String s : str.split(\" \")) {\n // use collect(...) to emit a row\n collect(Row.of(s, s.length()));\n }\n }\n}', NULL, '2022-10-19 09:22:58', '2022-10-25 17:49:30');
INSERT INTO `dlink_udf_template` (`id`, `name`, `code_type`, `function_type`, `template_code`, `enabled`, `create_time`, `update_time`)
VALUES (3, 'scala_udf', 'Scala', 'UDF', '${(package==\'\')?string(\'\',\'package \'+package+\';\')}\n\nimport org.apache.flink.table.api._\nimport org.apache.flink.table.functions.ScalarFunction\n\n// 定义可参数化的函数逻辑\nclass ${className} extends ScalarFunction {\n def eval(s: String, begin: Integer, end: Integer): String = {\n \"this is scala\"\n }\n}', NULL, '2022-10-25 09:21:32', '2022-10-25 17:49:46');
INSERT INTO `dlink_udf_template` (`id`, `name`, `code_type`, `function_type`, `template_code`, `enabled`, `create_time`, `update_time`)
VALUES (4, 'python_udf_1', 'Python', 'UDF', 'from pyflink.table import ScalarFunction, DataTypes\nfrom pyflink.table.udf import udf\n\nclass ${className}(ScalarFunction):\n def __init__(self):\n pass\n\n def eval(self, variable):\n return str(variable)\n\n\n${attr!\'f\'} = udf(HashCode(), result_type=DataTypes.STRING())', NULL, '2022-10-25 09:23:07', '2022-10-25 09:34:01');
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');
SET FOREIGN_KEY_CHECKS = 1;
......@@ -641,7 +641,7 @@
<eclipse>
<file>style/spotless_dlink_formatter.xml</file>
</eclipse>
<removeUnusedImports />
<removeUnusedImports/>
<importOrder>
<order>\#,com.dlink,org.apache,java,javassist,javax,org,com,</order>
</importOrder>
......@@ -678,7 +678,7 @@
<includes>
<include>**/*.md</include>
</includes>
<flexmark />
<flexmark/>
</markdown>
</configuration>
<executions>
......@@ -693,25 +693,44 @@
</plugins>
</build>
<repositories>
<repository>
<id>aliyun</id>
<url>https://maven.aliyun.com/repository/central</url>
</repository>
<repository>
<profiles>
<profile>
<id>maven-central</id>
<url>https://repo1.maven.org/maven2/</url>
</repository>
</repositories>
<activation>
<property>
<name>maven-central</name>
</property>
</activation>
<repositories>
<repository>
<id>maven-central</id>
<url>https://repo1.maven.org/maven2/</url>
</repository>
</repositories>
</profile>
<pluginRepositories>
<pluginRepository>
<profile>
<id>aliyun</id>
<url>https://maven.aliyun.com/repository/central</url>
</pluginRepository>
</pluginRepositories>
<activation>
<activeByDefault>true</activeByDefault>
<property>
<name>aliyun</name>
</property>
</activation>
<repositories>
<repository>
<id>aliyun</id>
<url>https://maven.aliyun.com/repository/central</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>aliyun</id>
<url>https://maven.aliyun.com/repository/central</url>
</pluginRepository>
</pluginRepositories>
</profile>
<profiles>
<profile>
<id>web</id>
<activation>
......@@ -914,7 +933,8 @@
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalJOptions>
<additionalJOption>--add-exports=java.base/sun.net.util=ALL-UNNAMED</additionalJOption>
<additionalJOption>--add-exports=java.base/sun.net.util=ALL-UNNAMED
</additionalJOption>
</additionalJOptions>
</configuration>
</plugin>
......
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