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: ...@@ -98,7 +98,7 @@ jobs:
./mvnw -B clean install \ ./mvnw -B clean install \
-Dmaven.test.skip=true \ -Dmaven.test.skip=true \
-Dcheckstyle.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 --no-snapshot-updates
# 查看打包的大小 # 查看打包的大小
......
...@@ -940,6 +940,22 @@ CREATE TABLE `dlink_udf_template` ( ...@@ -940,6 +940,22 @@ CREATE TABLE `dlink_udf_template` (
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='udf template'; ) 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; SET FOREIGN_KEY_CHECKS = 1;
...@@ -641,7 +641,7 @@ ...@@ -641,7 +641,7 @@
<eclipse> <eclipse>
<file>style/spotless_dlink_formatter.xml</file> <file>style/spotless_dlink_formatter.xml</file>
</eclipse> </eclipse>
<removeUnusedImports /> <removeUnusedImports/>
<importOrder> <importOrder>
<order>\#,com.dlink,org.apache,java,javassist,javax,org,com,</order> <order>\#,com.dlink,org.apache,java,javassist,javax,org,com,</order>
</importOrder> </importOrder>
...@@ -678,7 +678,7 @@ ...@@ -678,7 +678,7 @@
<includes> <includes>
<include>**/*.md</include> <include>**/*.md</include>
</includes> </includes>
<flexmark /> <flexmark/>
</markdown> </markdown>
</configuration> </configuration>
<executions> <executions>
...@@ -693,25 +693,44 @@ ...@@ -693,25 +693,44 @@
</plugins> </plugins>
</build> </build>
<repositories> <profiles>
<repository> <profile>
<id>aliyun</id>
<url>https://maven.aliyun.com/repository/central</url>
</repository>
<repository>
<id>maven-central</id> <id>maven-central</id>
<url>https://repo1.maven.org/maven2/</url> <activation>
</repository> <property>
</repositories> <name>maven-central</name>
</property>
</activation>
<repositories>
<repository>
<id>maven-central</id>
<url>https://repo1.maven.org/maven2/</url>
</repository>
</repositories>
</profile>
<pluginRepositories> <profile>
<pluginRepository>
<id>aliyun</id> <id>aliyun</id>
<url>https://maven.aliyun.com/repository/central</url> <activation>
</pluginRepository> <activeByDefault>true</activeByDefault>
</pluginRepositories> <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> <profile>
<id>web</id> <id>web</id>
<activation> <activation>
...@@ -914,7 +933,8 @@ ...@@ -914,7 +933,8 @@
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<configuration> <configuration>
<additionalJOptions> <additionalJOptions>
<additionalJOption>--add-exports=java.base/sun.net.util=ALL-UNNAMED</additionalJOption> <additionalJOption>--add-exports=java.base/sun.net.util=ALL-UNNAMED
</additionalJOption>
</additionalJOptions> </additionalJOptions>
</configuration> </configuration>
</plugin> </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