From f3536b62caeb8d1cf2f9f09b1d68eb8a6cd87f18 Mon Sep 17 00:00:00 2001 From: qianmoQ Date: Tue, 14 Mar 2023 22:04:41 +0800 Subject: [PATCH 1/3] [Core] [Executor] Support the execution of pipeline to record logs to the local --- .gitignore | 1 + core/datacap-server/pom.xml | 5 + .../src/main/etc/conf/application.properties | 2 + .../src/main/etc/conf/plugins/default.json | 50 -------- .../src/main/etc/conf/plugins/default.yaml | 33 +++++ .../etc/conf/plugins/http/clickhouse.json | 28 ----- .../etc/conf/plugins/http/clickhouse.yaml | 58 +++++++++ .../etc/conf/plugins/jdbc/clickhouse.json | 77 ------------ .../etc/conf/plugins/jdbc/clickhouse.yaml | 71 +++++++++++ .../main/etc/conf/plugins/jdbc/duckdb.json | 36 ------ .../main/etc/conf/plugins/jdbc/duckdb.yaml | 25 ++++ .../src/main/etc/conf/plugins/jdbc/mysql.json | 62 --------- .../src/main/etc/conf/plugins/jdbc/mysql.yaml | 40 ++++++ .../main/etc/conf/plugins/jdbc/oceanbase.json | 59 --------- .../main/etc/conf/plugins/jdbc/oceanbase.yaml | 39 ++++++ .../main/etc/conf/plugins/jdbc/presto.json | 56 --------- .../main/etc/conf/plugins/jdbc/presto.yaml | 37 ++++++ .../src/main/etc/conf/plugins/jdbc/redis.json | 33 ----- .../src/main/etc/conf/plugins/jdbc/redis.yaml | 22 ++++ .../main/etc/conf/plugins/jdbc/snowflake.json | 52 -------- .../main/etc/conf/plugins/jdbc/snowflake.yaml | 35 ++++++ .../src/main/etc/conf/plugins/jdbc/ydb.json | 46 ------- .../src/main/etc/conf/plugins/jdbc/ydb.yaml | 31 +++++ .../main/etc/conf/plugins/native/alioss.json | 39 ------ .../main/etc/conf/plugins/native/alioss.yaml | 26 ++++ .../main/etc/conf/plugins/native/kafka.json | 19 --- .../main/etc/conf/plugins/native/kafka.yaml | 12 ++ .../main/etc/conf/plugins/native/redis.json | 33 ----- .../main/etc/conf/plugins/native/redis.yaml | 22 ++++ .../etc/conf/plugins/native/zookeeper.json | 19 --- .../etc/conf/plugins/native/zookeeper.yaml | 12 ++ .../datacap/server/body/PipelineBody.java | 4 +- .../server/body/PipelineFieldBody.java | 18 +++ .../server/common/BeanToPropertiesCommon.java | 16 ++- .../datacap/server/common/PluginCommon.java | 33 +++++ .../datacap/server/common/ServiceState.java | 2 + .../controller/user/PipelineController.java | 3 +- .../plugin/configure/IConfigureExecutor.java | 2 +- .../configure/IConfigureExecutorField.java | 7 ++ .../configure/IConfigurePipelineType.java | 7 ++ .../service/impl/PipelineServiceImpl.java | 119 +++++++++++++++--- .../service/impl/SourceServiceImpl.java | 8 +- .../server/common/PluginCommonTest.java | 4 +- .../server/common/ResourceCommonTest.java | 2 +- .../src/test/resources/default.json | 2 - .../src/test/resources/default.yaml | 0 .../edurt/datacap/spi/executor/Pipeline.java | 9 +- .../datacap/spi/executor/PipelineField.java | 2 + .../datacap/executor/SeatunnelExecutor.java | 22 ++-- .../connector/ConnectorClickHouse.java | 13 +- .../executor/SeatunnelExecutorTest.java | 12 ++ .../datacap/lib/shell/ShellConfigure.java | 2 + .../process/ProcessBuilderCommander.java | 9 +- 53 files changed, 702 insertions(+), 674 deletions(-) delete mode 100644 core/datacap-server/src/main/etc/conf/plugins/default.json create mode 100644 core/datacap-server/src/main/etc/conf/plugins/default.yaml delete mode 100644 core/datacap-server/src/main/etc/conf/plugins/http/clickhouse.json create mode 100644 core/datacap-server/src/main/etc/conf/plugins/http/clickhouse.yaml delete mode 100644 core/datacap-server/src/main/etc/conf/plugins/jdbc/clickhouse.json create mode 100644 core/datacap-server/src/main/etc/conf/plugins/jdbc/clickhouse.yaml delete mode 100644 core/datacap-server/src/main/etc/conf/plugins/jdbc/duckdb.json create mode 100644 core/datacap-server/src/main/etc/conf/plugins/jdbc/duckdb.yaml delete mode 100644 core/datacap-server/src/main/etc/conf/plugins/jdbc/mysql.json create mode 100644 core/datacap-server/src/main/etc/conf/plugins/jdbc/mysql.yaml delete mode 100644 core/datacap-server/src/main/etc/conf/plugins/jdbc/oceanbase.json create mode 100644 core/datacap-server/src/main/etc/conf/plugins/jdbc/oceanbase.yaml delete mode 100644 core/datacap-server/src/main/etc/conf/plugins/jdbc/presto.json create mode 100644 core/datacap-server/src/main/etc/conf/plugins/jdbc/presto.yaml delete mode 100644 core/datacap-server/src/main/etc/conf/plugins/jdbc/redis.json create mode 100644 core/datacap-server/src/main/etc/conf/plugins/jdbc/redis.yaml delete mode 100644 core/datacap-server/src/main/etc/conf/plugins/jdbc/snowflake.json create mode 100644 core/datacap-server/src/main/etc/conf/plugins/jdbc/snowflake.yaml delete mode 100644 core/datacap-server/src/main/etc/conf/plugins/jdbc/ydb.json create mode 100644 core/datacap-server/src/main/etc/conf/plugins/jdbc/ydb.yaml delete mode 100644 core/datacap-server/src/main/etc/conf/plugins/native/alioss.json create mode 100644 core/datacap-server/src/main/etc/conf/plugins/native/alioss.yaml delete mode 100644 core/datacap-server/src/main/etc/conf/plugins/native/kafka.json create mode 100644 core/datacap-server/src/main/etc/conf/plugins/native/kafka.yaml delete mode 100644 core/datacap-server/src/main/etc/conf/plugins/native/redis.json create mode 100644 core/datacap-server/src/main/etc/conf/plugins/native/redis.yaml delete mode 100644 core/datacap-server/src/main/etc/conf/plugins/native/zookeeper.json create mode 100644 core/datacap-server/src/main/etc/conf/plugins/native/zookeeper.yaml create mode 100644 core/datacap-server/src/main/java/io/edurt/datacap/server/body/PipelineFieldBody.java create mode 100644 core/datacap-server/src/main/java/io/edurt/datacap/server/plugin/configure/IConfigurePipelineType.java delete mode 100644 core/datacap-server/src/test/resources/default.json create mode 100644 core/datacap-server/src/test/resources/default.yaml diff --git a/.gitignore b/.gitignore index 5309ef4e..146eeb97 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ tmp/ .vscode dist/datacap/ list +*.configure diff --git a/core/datacap-server/pom.xml b/core/datacap-server/pom.xml index ce86d7ad..f7b8dfb9 100644 --- a/core/datacap-server/pom.xml +++ b/core/datacap-server/pom.xml @@ -96,6 +96,11 @@ chatgpt-java 1.0.4 + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + ${jackson.version} + io.edurt.datacap datacap-spi diff --git a/core/datacap-server/src/main/etc/conf/application.properties b/core/datacap-server/src/main/etc/conf/application.properties index b17b9f2a..7af135a1 100644 --- a/core/datacap-server/src/main/etc/conf/application.properties +++ b/core/datacap-server/src/main/etc/conf/application.properties @@ -10,4 +10,6 @@ spring.datasource.password=12345678 datacap.security.secret=DataCapSecretKey datacap.security.expiration=86400000 # Executor +### If this directory is not set, the system will get the project root directory to build the data subdirectory +datacap.executor.data= datacap.executor.seatunnel.home=/opt/lib/seatunnel diff --git a/core/datacap-server/src/main/etc/conf/plugins/default.json b/core/datacap-server/src/main/etc/conf/plugins/default.json deleted file mode 100644 index 4c1b8daf..00000000 --- a/core/datacap-server/src/main/etc/conf/plugins/default.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "Default", - "supportTime": "2022-09-22", - "configures": [ - { - "field": "name", - "type": "String", - "required": true, - "message": "name is a required field, please be sure to enter" - }, - { - "field": "host", - "type": "String", - "required": true, - "value": "127.0.0.1", - "message": "host is a required field, please be sure to enter" - }, - { - "field": "port", - "type": "Number", - "required": true, - "min": 1, - "max": 65535, - "value": 1, - "message": "port is a required field, please be sure to enter" - }, - { - "field": "username", - "type": "String", - "group": "authorization" - }, - { - "field": "password", - "type": "String", - "group": "authorization" - }, - { - "field": "database", - "type": "String", - "message": "database is a required field, please be sure to enter", - "group": "advanced" - }, - { - "field": "configures", - "type": "Array", - "value": [], - "group": "custom" - } - ] -} diff --git a/core/datacap-server/src/main/etc/conf/plugins/default.yaml b/core/datacap-server/src/main/etc/conf/plugins/default.yaml new file mode 100644 index 00000000..66a4c7d0 --- /dev/null +++ b/core/datacap-server/src/main/etc/conf/plugins/default.yaml @@ -0,0 +1,33 @@ +name: Default +supportTime: '2022-09-22' +configures: + - field: name + type: String + required: true + message: name is a required field, please be sure to enter + - field: host + type: String + required: true + value: 127.0.0.1 + message: host is a required field, please be sure to enter + - field: port + type: Number + required: true + min: 1 + max: 65535 + value: 1 + message: port is a required field, please be sure to enter + - field: username + type: String + group: authorization + - field: password + type: String + group: authorization + - field: database + type: String + message: database is a required field, please be sure to enter + group: advanced + - field: configures + type: Array + value: [ ] + group: custom diff --git a/core/datacap-server/src/main/etc/conf/plugins/http/clickhouse.json b/core/datacap-server/src/main/etc/conf/plugins/http/clickhouse.json deleted file mode 100644 index 2e2444fb..00000000 --- a/core/datacap-server/src/main/etc/conf/plugins/http/clickhouse.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "ClickHouse", - "supportTime": "2022-11-09", - "configures": [ - { - "field": "name", - "type": "String", - "required": true, - "message": "name is a required field, please be sure to enter" - }, - { - "field": "host", - "type": "String", - "required": true, - "value": "127.0.0.1", - "message": "host is a required field, please be sure to enter" - }, - { - "field": "port", - "type": "Number", - "required": true, - "min": 1, - "max": 65535, - "value": 8123, - "message": "port is a required field, please be sure to enter" - } - ] -} diff --git a/core/datacap-server/src/main/etc/conf/plugins/http/clickhouse.yaml b/core/datacap-server/src/main/etc/conf/plugins/http/clickhouse.yaml new file mode 100644 index 00000000..5bf046a6 --- /dev/null +++ b/core/datacap-server/src/main/etc/conf/plugins/http/clickhouse.yaml @@ -0,0 +1,58 @@ +name: ClickHouse +supportTime: '2022-11-09' + +configures: + - field: name + type: String + required: true + message: name is a required field, please be sure to enter + - field: host + type: String + required: true + value: 127.0.0.1 + message: host is a required field, please be sure to enter + - field: port + type: Number + required: true + min: 1 + max: 65535 + value: 9000 + message: port is a required field, please be sure to enter + +pipelines: + - executor: Seatunnel + type: SOURCE + fields: + - field: host + origin: host + required: true + - field: database + origin: database + required: true + - field: sql + origin: context + required: true + - field: username + origin: username + required: true + - field: password + origin: password + required: true + - executor: Seatunnel + type: SINK + fields: + - field: host + origin: host + required: true + - field: database + origin: database + required: true + - field: sql + origin: context + required: true + - field: username + origin: username + required: true + - field: password + origin: password + required: true diff --git a/core/datacap-server/src/main/etc/conf/plugins/jdbc/clickhouse.json b/core/datacap-server/src/main/etc/conf/plugins/jdbc/clickhouse.json deleted file mode 100644 index 877da9f9..00000000 --- a/core/datacap-server/src/main/etc/conf/plugins/jdbc/clickhouse.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "ClickHouse", - "supportTime": "2022-09-22", - "configures": [ - { - "field": "name", - "type": "String", - "required": true, - "message": "name is a required field, please be sure to enter" - }, - { - "field": "host", - "type": "String", - "required": true, - "value": "127.0.0.1", - "message": "host is a required field, please be sure to enter" - }, - { - "field": "port", - "type": "Number", - "required": true, - "min": 1, - "max": 65535, - "value": 9000, - "message": "port is a required field, please be sure to enter" - }, - { - "field": "username", - "type": "String", - "group": "authorization" - }, - { - "field": "password", - "type": "String", - "group": "authorization" - }, - { - "field": "database", - "type": "String", - "group": "advanced" - }, - { - "field": "configures", - "type": "Array", - "value": [], - "group": "custom" - } - ], - "pipelines": [ - { - "executor": "Seatunnel", - "type": "FROM", - "fields": [ - { - "field": "host", - "required": true - }, - { - "field": "database", - "required": true - }, - { - "field": "sql", - "required": true - }, - { - "field": "username", - "required": true - }, - { - "field": "password", - "required": true - } - ] - } - ] -} diff --git a/core/datacap-server/src/main/etc/conf/plugins/jdbc/clickhouse.yaml b/core/datacap-server/src/main/etc/conf/plugins/jdbc/clickhouse.yaml new file mode 100644 index 00000000..3bde1f99 --- /dev/null +++ b/core/datacap-server/src/main/etc/conf/plugins/jdbc/clickhouse.yaml @@ -0,0 +1,71 @@ +name: ClickHouse +supportTime: '2022-09-22' + +configures: + - field: name + type: String + required: true + message: name is a required field, please be sure to enter + - field: host + type: String + required: true + value: 127.0.0.1 + message: host is a required field, please be sure to enter + - field: port + type: Number + required: true + min: 1 + max: 65535 + value: 9000 + message: port is a required field, please be sure to enter + - field: username + type: String + group: authorization + - field: password + type: String + group: authorization + - field: database + type: String + group: advanced + - field: configures + type: Array + value: [ ] + group: custom + +pipelines: + - executor: Seatunnel + type: SOURCE + fields: + - field: host + required: true + - field: database + required: true + override: true + input: true + - field: sql + origin: context + required: true + override: true + input: true + - field: username + required: true + - field: password + required: false + - executor: Seatunnel + type: SINK + fields: + - field: host + required: true + - field: database + override: true + required: true + - field: table + override: true + required: true + - field: username + required: true + - field: password + required: true + - field: fields + override: true + required: true diff --git a/core/datacap-server/src/main/etc/conf/plugins/jdbc/duckdb.json b/core/datacap-server/src/main/etc/conf/plugins/jdbc/duckdb.json deleted file mode 100644 index ad1b67bd..00000000 --- a/core/datacap-server/src/main/etc/conf/plugins/jdbc/duckdb.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "DuckDB", - "supportTime": "2023-02-20", - "configures": [ - { - "field": "name", - "type": "String", - "required": true, - "message": "name is a required field, please be sure to enter" - }, - { - "field": "host", - "type": "String", - "required": true, - "value": "/root", - "message": "host is a required field, please be sure to enter" - }, - { - "field": "port", - "type": "Number", - "required": true, - "min": 1, - "max": 65535, - "value": 0, - "message": "port is a required field, please be sure to enter" - }, - { - "field": "database", - "type": "String", - "required": true, - "value": "local", - "message": "database is a required field, please be sure to enter", - "group": "advanced" - } - ] -} diff --git a/core/datacap-server/src/main/etc/conf/plugins/jdbc/duckdb.yaml b/core/datacap-server/src/main/etc/conf/plugins/jdbc/duckdb.yaml new file mode 100644 index 00000000..12eddac7 --- /dev/null +++ b/core/datacap-server/src/main/etc/conf/plugins/jdbc/duckdb.yaml @@ -0,0 +1,25 @@ +name: DuckDB +supportTime: '2023-02-20' +configures: + - field: name + type: String + required: true + message: name is a required field, please be sure to enter + - field: host + type: String + required: true + value: "/root" + message: host is a required field, please be sure to enter + - field: port + type: Number + required: true + min: 1 + max: 65535 + value: 0 + message: port is a required field, please be sure to enter + - field: database + type: String + required: true + value: local + message: database is a required field, please be sure to enter + group: advanced diff --git a/core/datacap-server/src/main/etc/conf/plugins/jdbc/mysql.json b/core/datacap-server/src/main/etc/conf/plugins/jdbc/mysql.json deleted file mode 100644 index 6ebccee4..00000000 --- a/core/datacap-server/src/main/etc/conf/plugins/jdbc/mysql.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "MySQL", - "supportTime": "2022-09-19", - "configures": [ - { - "field": "name", - "type": "String", - "required": true, - "message": "name is a required field, please be sure to enter" - }, - { - "field": "host", - "type": "String", - "required": true, - "value": "127.0.0.1", - "message": "host is a required field, please be sure to enter" - }, - { - "field": "port", - "type": "Number", - "required": true, - "min": 1, - "max": 65535, - "value": 3306, - "message": "port is a required field, please be sure to enter" - }, - { - "field": "username", - "type": "String", - "group": "authorization" - }, - { - "field": "password", - "type": "String", - "group": "authorization" - }, - { - "field": "ssl", - "type": "Boolean", - "group": "authorization" - }, - { - "field": "database", - "type": "String", - "required": true, - "value": "default", - "message": "database is a required field, please be sure to enter", - "group": "advanced" - }, - { - "field": "configures", - "type": "Array", - "value": [ - { - "field": "useOldAliasMetadataBehavior", - "value": true - } - ], - "group": "custom" - } - ] -} diff --git a/core/datacap-server/src/main/etc/conf/plugins/jdbc/mysql.yaml b/core/datacap-server/src/main/etc/conf/plugins/jdbc/mysql.yaml new file mode 100644 index 00000000..a60a4def --- /dev/null +++ b/core/datacap-server/src/main/etc/conf/plugins/jdbc/mysql.yaml @@ -0,0 +1,40 @@ +name: MySQL +supportTime: '2022-09-19' +configures: + - field: name + type: String + required: true + message: name is a required field, please be sure to enter + - field: host + type: String + required: true + value: 127.0.0.1 + message: host is a required field, please be sure to enter + - field: port + type: Number + required: true + min: 1 + max: 65535 + value: 3306 + message: port is a required field, please be sure to enter + - field: username + type: String + group: authorization + - field: password + type: String + group: authorization + - field: ssl + type: Boolean + group: authorization + - field: database + type: String + required: true + value: default + message: database is a required field, please be sure to enter + group: advanced + - field: configures + type: Array + value: + - field: useOldAliasMetadataBehavior + value: true + group: custom diff --git a/core/datacap-server/src/main/etc/conf/plugins/jdbc/oceanbase.json b/core/datacap-server/src/main/etc/conf/plugins/jdbc/oceanbase.json deleted file mode 100644 index b9741389..00000000 --- a/core/datacap-server/src/main/etc/conf/plugins/jdbc/oceanbase.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "OceanBase", - "supportTime": "2022-11-30", - "configures": [ - { - "field": "name", - "type": "String", - "required": true, - "message": "name is a required field, please be sure to enter" - }, - { - "field": "host", - "type": "String", - "required": true, - "value": "127.0.0.1", - "message": "host is a required field, please be sure to enter" - }, - { - "field": "port", - "type": "Number", - "required": true, - "min": 1, - "max": 65535, - "value": 2881, - "message": "port is a required field, please be sure to enter" - }, - { - "field": "username", - "type": "String", - "required": true, - "group": "authorization" - }, - { - "field": "password", - "type": "String", - "required": true, - "group": "authorization" - }, - { - "field": "database", - "type": "String", - "required": true, - "value": "default", - "message": "database is a required field, please be sure to enter", - "group": "advanced" - }, - { - "field": "configures", - "type": "Array", - "value": [ - { - "field": "useOldAliasMetadataBehavior", - "value": true - } - ], - "group": "custom" - } - ] -} diff --git a/core/datacap-server/src/main/etc/conf/plugins/jdbc/oceanbase.yaml b/core/datacap-server/src/main/etc/conf/plugins/jdbc/oceanbase.yaml new file mode 100644 index 00000000..81f5318a --- /dev/null +++ b/core/datacap-server/src/main/etc/conf/plugins/jdbc/oceanbase.yaml @@ -0,0 +1,39 @@ +name: OceanBase +supportTime: '2022-11-30' +configures: + - field: name + type: String + required: true + message: name is a required field, please be sure to enter + - field: host + type: String + required: true + value: 127.0.0.1 + message: host is a required field, please be sure to enter + - field: port + type: Number + required: true + min: 1 + max: 65535 + value: 2881 + message: port is a required field, please be sure to enter + - field: username + type: String + required: true + group: authorization + - field: password + type: String + required: true + group: authorization + - field: database + type: String + required: true + value: default + message: database is a required field, please be sure to enter + group: advanced + - field: configures + type: Array + value: + - field: useOldAliasMetadataBehavior + value: true + group: custom diff --git a/core/datacap-server/src/main/etc/conf/plugins/jdbc/presto.json b/core/datacap-server/src/main/etc/conf/plugins/jdbc/presto.json deleted file mode 100644 index 3d86d7dc..00000000 --- a/core/datacap-server/src/main/etc/conf/plugins/jdbc/presto.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "Presto", - "supportTime": "2022-09-25", - "configures": [ - { - "field": "name", - "type": "String", - "required": true, - "message": "name is a required field, please be sure to enter" - }, - { - "field": "host", - "type": "String", - "required": true, - "value": "127.0.0.1", - "message": "host is a required field, please be sure to enter" - }, - { - "field": "port", - "type": "Number", - "required": true, - "min": 1, - "max": 65535, - "value": 8080, - "message": "port is a required field, please be sure to enter" - }, - { - "field": "username", - "type": "String", - "group": "authorization" - }, - { - "field": "password", - "type": "String", - "group": "authorization" - }, - { - "field": "database", - "type": "String", - "message": "database is a required field, please be sure to enter", - "group": "advanced" - }, - { - "field": "catalog", - "type": "String", - "value": "", - "group": "advanced" - }, - { - "field": "configures", - "type": "Array", - "value": [], - "group": "custom" - } - ] -} diff --git a/core/datacap-server/src/main/etc/conf/plugins/jdbc/presto.yaml b/core/datacap-server/src/main/etc/conf/plugins/jdbc/presto.yaml new file mode 100644 index 00000000..6bee74df --- /dev/null +++ b/core/datacap-server/src/main/etc/conf/plugins/jdbc/presto.yaml @@ -0,0 +1,37 @@ +name: Presto +supportTime: '2022-09-25' +configures: + - field: name + type: String + required: true + message: name is a required field, please be sure to enter + - field: host + type: String + required: true + value: 127.0.0.1 + message: host is a required field, please be sure to enter + - field: port + type: Number + required: true + min: 1 + max: 65535 + value: 8080 + message: port is a required field, please be sure to enter + - field: username + type: String + group: authorization + - field: password + type: String + group: authorization + - field: database + type: String + message: database is a required field, please be sure to enter + group: advanced + - field: catalog + type: String + value: '' + group: advanced + - field: configures + type: Array + value: [ ] + group: custom diff --git a/core/datacap-server/src/main/etc/conf/plugins/jdbc/redis.json b/core/datacap-server/src/main/etc/conf/plugins/jdbc/redis.json deleted file mode 100644 index cb354cbc..00000000 --- a/core/datacap-server/src/main/etc/conf/plugins/jdbc/redis.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "Redis", - "supportTime": "2022-09-26", - "configures": [ - { - "field": "name", - "type": "String", - "required": true, - "message": "name is a required field, please be sure to enter" - }, - { - "field": "host", - "type": "String", - "required": true, - "value": "127.0.0.1", - "message": "host is a required field, please be sure to enter" - }, - { - "field": "port", - "type": "Number", - "required": true, - "min": 1, - "max": 65535, - "value": 6379, - "message": "port is a required field, please be sure to enter" - }, - { - "field": "password", - "type": "String", - "group": "authorization" - } - ] -} diff --git a/core/datacap-server/src/main/etc/conf/plugins/jdbc/redis.yaml b/core/datacap-server/src/main/etc/conf/plugins/jdbc/redis.yaml new file mode 100644 index 00000000..ac58b269 --- /dev/null +++ b/core/datacap-server/src/main/etc/conf/plugins/jdbc/redis.yaml @@ -0,0 +1,22 @@ +name: Redis +supportTime: '2022-09-26' +configures: + - field: name + type: String + required: true + message: name is a required field, please be sure to enter + - field: host + type: String + required: true + value: 127.0.0.1 + message: host is a required field, please be sure to enter + - field: port + type: Number + required: true + min: 1 + max: 65535 + value: 6379 + message: port is a required field, please be sure to enter + - field: password + type: String + group: authorization diff --git a/core/datacap-server/src/main/etc/conf/plugins/jdbc/snowflake.json b/core/datacap-server/src/main/etc/conf/plugins/jdbc/snowflake.json deleted file mode 100644 index 0606987a..00000000 --- a/core/datacap-server/src/main/etc/conf/plugins/jdbc/snowflake.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "ClickHouse", - "supportTime": "2023-01-29", - "configures": [ - { - "field": "name", - "type": "String", - "required": true, - "message": "name is a required field, please be sure to enter" - }, - { - "field": "host", - "type": "String", - "required": true, - "value": "127.0.0.1", - "message": "host is a required field, please be sure to enter" - }, - { - "field": "port", - "type": "Number", - "required": true, - "min": 1, - "max": 65535, - "value": 80, - "message": "port is a required field, please be sure to enter" - }, - { - "field": "username", - "type": "String", - "required": true, - "group": "authorization" - }, - { - "field": "password", - "type": "String", - "required": true, - "group": "authorization" - }, - { - "field": "database", - "type": "String", - "message": "database is a required field, please be sure to enter", - "group": "advanced" - }, - { - "field": "configures", - "type": "Array", - "value": [], - "group": "custom" - } - ] -} diff --git a/core/datacap-server/src/main/etc/conf/plugins/jdbc/snowflake.yaml b/core/datacap-server/src/main/etc/conf/plugins/jdbc/snowflake.yaml new file mode 100644 index 00000000..f378f7de --- /dev/null +++ b/core/datacap-server/src/main/etc/conf/plugins/jdbc/snowflake.yaml @@ -0,0 +1,35 @@ +name: Snowflake +supportTime: '2023-01-29' +configures: + - field: name + type: String + required: true + message: name is a required field, please be sure to enter + - field: host + type: String + required: true + value: 127.0.0.1 + message: host is a required field, please be sure to enter + - field: port + type: Number + required: true + min: 1 + max: 65535 + value: 80 + message: port is a required field, please be sure to enter + - field: username + type: String + required: true + group: authorization + - field: password + type: String + required: true + group: authorization + - field: database + type: String + message: database is a required field, please be sure to enter + group: advanced + - field: configures + type: Array + value: [ ] + group: custom diff --git a/core/datacap-server/src/main/etc/conf/plugins/jdbc/ydb.json b/core/datacap-server/src/main/etc/conf/plugins/jdbc/ydb.json deleted file mode 100644 index ada3a667..00000000 --- a/core/datacap-server/src/main/etc/conf/plugins/jdbc/ydb.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "YDB", - "supportTime": "2023-01-30", - "configures": [ - { - "field": "name", - "type": "String", - "required": true, - "message": "name is a required field, please be sure to enter" - }, - { - "field": "host", - "type": "String", - "required": true, - "value": "127.0.0.1", - "message": "host is a required field, please be sure to enter" - }, - { - "field": "port", - "type": "Number", - "required": true, - "min": 1, - "max": 65535, - "value": 2136, - "message": "port is a required field, please be sure to enter" - }, - { - "field": "username", - "type": "String", - "group": "authorization" - }, - { - "field": "password", - "type": "String", - "group": "authorization" - }, - { - "field": "database", - "type": "String", - "required": true, - "value": "local", - "message": "database is a required field, please be sure to enter", - "group": "advanced" - } - ] -} diff --git a/core/datacap-server/src/main/etc/conf/plugins/jdbc/ydb.yaml b/core/datacap-server/src/main/etc/conf/plugins/jdbc/ydb.yaml new file mode 100644 index 00000000..9aae2e70 --- /dev/null +++ b/core/datacap-server/src/main/etc/conf/plugins/jdbc/ydb.yaml @@ -0,0 +1,31 @@ +name: YDB +supportTime: '2023-01-30' +configures: + - field: name + type: String + required: true + message: name is a required field, please be sure to enter + - field: host + type: String + required: true + value: 127.0.0.1 + message: host is a required field, please be sure to enter + - field: port + type: Number + required: true + min: 1 + max: 65535 + value: 2136 + message: port is a required field, please be sure to enter + - field: username + type: String + group: authorization + - field: password + type: String + group: authorization + - field: database + type: String + required: true + value: local + message: database is a required field, please be sure to enter + group: advanced diff --git a/core/datacap-server/src/main/etc/conf/plugins/native/alioss.json b/core/datacap-server/src/main/etc/conf/plugins/native/alioss.json deleted file mode 100644 index e6adbd72..00000000 --- a/core/datacap-server/src/main/etc/conf/plugins/native/alioss.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "Alioss", - "supportTime": "2023-02-23", - "configures": [ - { - "field": "name", - "type": "String", - "required": true, - "message": "name is a required field, please be sure to enter" - }, - { - "field": "host", - "type": "String", - "required": true, - "value": "https://oss-cn-regison.aliyuncs.com", - "message": "host is a required field, please be sure to enter" - }, - { - "field": "username", - "type": "String", - "required": true, - "group": "authorization" - }, - { - "field": "password", - "type": "String", - "required": true, - "group": "authorization" - }, - { - "field": "database", - "type": "String", - "required": true, - "value": "default", - "message": "database is a required field, please be sure to enter", - "group": "advanced" - } - ] -} diff --git a/core/datacap-server/src/main/etc/conf/plugins/native/alioss.yaml b/core/datacap-server/src/main/etc/conf/plugins/native/alioss.yaml new file mode 100644 index 00000000..7985c9ec --- /dev/null +++ b/core/datacap-server/src/main/etc/conf/plugins/native/alioss.yaml @@ -0,0 +1,26 @@ +name: Alioss +supportTime: '2023-02-23' +configures: + - field: name + type: String + required: true + message: name is a required field, please be sure to enter + - field: host + type: String + required: true + value: https://oss-cn-regison.aliyuncs.com + message: host is a required field, please be sure to enter + - field: username + type: String + required: true + group: authorization + - field: password + type: String + required: true + group: authorization + - field: database + type: String + required: true + value: default + message: database is a required field, please be sure to enter + group: advanced diff --git a/core/datacap-server/src/main/etc/conf/plugins/native/kafka.json b/core/datacap-server/src/main/etc/conf/plugins/native/kafka.json deleted file mode 100644 index 5f9c4db7..00000000 --- a/core/datacap-server/src/main/etc/conf/plugins/native/kafka.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "Kafka", - "supportTime": "2023-03-06", - "configures": [ - { - "field": "name", - "type": "String", - "required": true, - "message": "name is a required field, please be sure to enter" - }, - { - "field": "host", - "type": "String", - "required": true, - "value": "127.0.0.1:9092", - "message": "host is a required field, please be sure to enter" - } - ] -} diff --git a/core/datacap-server/src/main/etc/conf/plugins/native/kafka.yaml b/core/datacap-server/src/main/etc/conf/plugins/native/kafka.yaml new file mode 100644 index 00000000..1609976a --- /dev/null +++ b/core/datacap-server/src/main/etc/conf/plugins/native/kafka.yaml @@ -0,0 +1,12 @@ +name: Kafka +supportTime: '2023-03-06' +configures: + - field: name + type: String + required: true + message: name is a required field, please be sure to enter + - field: host + type: String + required: true + value: 127.0.0.1:9092 + message: host is a required field, please be sure to enter diff --git a/core/datacap-server/src/main/etc/conf/plugins/native/redis.json b/core/datacap-server/src/main/etc/conf/plugins/native/redis.json deleted file mode 100644 index 3d61c465..00000000 --- a/core/datacap-server/src/main/etc/conf/plugins/native/redis.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "Redis", - "supportTime": "2022-12-01", - "configures": [ - { - "field": "name", - "type": "String", - "required": true, - "message": "name is a required field, please be sure to enter" - }, - { - "field": "host", - "type": "String", - "required": true, - "value": "127.0.0.1", - "message": "host is a required field, please be sure to enter" - }, - { - "field": "port", - "type": "Number", - "required": true, - "min": 1, - "max": 65535, - "value": 6379, - "message": "port is a required field, please be sure to enter" - }, - { - "field": "password", - "type": "String", - "group": "authorization" - } - ] -} diff --git a/core/datacap-server/src/main/etc/conf/plugins/native/redis.yaml b/core/datacap-server/src/main/etc/conf/plugins/native/redis.yaml new file mode 100644 index 00000000..81eced9a --- /dev/null +++ b/core/datacap-server/src/main/etc/conf/plugins/native/redis.yaml @@ -0,0 +1,22 @@ +name: Redis +supportTime: '2022-12-01' +configures: + - field: name + type: String + required: true + message: name is a required field, please be sure to enter + - field: host + type: String + required: true + value: 127.0.0.1 + message: host is a required field, please be sure to enter + - field: port + type: Number + required: true + min: 1 + max: 65535 + value: 6379 + message: port is a required field, please be sure to enter + - field: password + type: String + group: authorization diff --git a/core/datacap-server/src/main/etc/conf/plugins/native/zookeeper.json b/core/datacap-server/src/main/etc/conf/plugins/native/zookeeper.json deleted file mode 100644 index 6643e111..00000000 --- a/core/datacap-server/src/main/etc/conf/plugins/native/zookeeper.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "Zookeeper", - "supportTime": "2023-02-07", - "configures": [ - { - "field": "name", - "type": "String", - "required": true, - "message": "name is a required field, please be sure to enter" - }, - { - "field": "host", - "type": "String", - "required": true, - "value": "127.0.0.1:2181", - "message": "host is a required field, please be sure to enter" - } - ] -} diff --git a/core/datacap-server/src/main/etc/conf/plugins/native/zookeeper.yaml b/core/datacap-server/src/main/etc/conf/plugins/native/zookeeper.yaml new file mode 100644 index 00000000..b1727ae2 --- /dev/null +++ b/core/datacap-server/src/main/etc/conf/plugins/native/zookeeper.yaml @@ -0,0 +1,12 @@ +name: Zookeeper +supportTime: '2023-02-07' +configures: + - field: name + type: String + required: true + message: name is a required field, please be sure to enter + - field: host + type: String + required: true + value: 127.0.0.1:2181 + message: host is a required field, please be sure to enter diff --git a/core/datacap-server/src/main/java/io/edurt/datacap/server/body/PipelineBody.java b/core/datacap-server/src/main/java/io/edurt/datacap/server/body/PipelineBody.java index 0b8ad320..93c805ed 100644 --- a/core/datacap-server/src/main/java/io/edurt/datacap/server/body/PipelineBody.java +++ b/core/datacap-server/src/main/java/io/edurt/datacap/server/body/PipelineBody.java @@ -11,8 +11,8 @@ import lombok.ToString; @AllArgsConstructor public class PipelineBody { - private Long from; - private Long to; + private PipelineFieldBody from; + private PipelineFieldBody to; private String content; private String executor; } diff --git a/core/datacap-server/src/main/java/io/edurt/datacap/server/body/PipelineFieldBody.java b/core/datacap-server/src/main/java/io/edurt/datacap/server/body/PipelineFieldBody.java new file mode 100644 index 00000000..3297052c --- /dev/null +++ b/core/datacap-server/src/main/java/io/edurt/datacap/server/body/PipelineFieldBody.java @@ -0,0 +1,18 @@ +package io.edurt.datacap.server.body; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; + +import java.util.Properties; + +@Data +@ToString +@NoArgsConstructor +@AllArgsConstructor +public class PipelineFieldBody +{ + private Long id; + private Properties configures; +} diff --git a/core/datacap-server/src/main/java/io/edurt/datacap/server/common/BeanToPropertiesCommon.java b/core/datacap-server/src/main/java/io/edurt/datacap/server/common/BeanToPropertiesCommon.java index 8b720b3c..8f53d5ec 100644 --- a/core/datacap-server/src/main/java/io/edurt/datacap/server/common/BeanToPropertiesCommon.java +++ b/core/datacap-server/src/main/java/io/edurt/datacap/server/common/BeanToPropertiesCommon.java @@ -1,5 +1,7 @@ package io.edurt.datacap.server.common; +import org.apache.commons.lang3.ObjectUtils; + import java.beans.BeanInfo; import java.beans.Introspector; import java.beans.PropertyDescriptor; @@ -19,10 +21,16 @@ public class BeanToPropertiesCommon PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors(); for (PropertyDescriptor propertyDescriptor : propertyDescriptors) { String propertyName = propertyDescriptor.getName(); - if (!propertyName.equals("class")) { - Method readMethod = propertyDescriptor.getReadMethod(); - Object value = readMethod.invoke(bean); - properties.setProperty(propertyName, value.toString()); + if (!propertyDescriptor.getPropertyType().getName().startsWith("io\\.edurt\\.datacap")) { + if (!propertyName.equals("class")) { + Method readMethod = propertyDescriptor.getReadMethod(); + if (!readMethod.getGenericReturnType().getTypeName().contains("io.edurt.datacap")) { + Object value = readMethod.invoke(bean); + if (ObjectUtils.isNotEmpty(value)) { + properties.setProperty(propertyName, value.toString()); + } + } + } } } } diff --git a/core/datacap-server/src/main/java/io/edurt/datacap/server/common/PluginCommon.java b/core/datacap-server/src/main/java/io/edurt/datacap/server/common/PluginCommon.java index 76be46f7..7b3c60b7 100644 --- a/core/datacap-server/src/main/java/io/edurt/datacap/server/common/PluginCommon.java +++ b/core/datacap-server/src/main/java/io/edurt/datacap/server/common/PluginCommon.java @@ -1,6 +1,8 @@ package io.edurt.datacap.server.common; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; import com.google.common.base.Preconditions; import com.google.inject.Injector; import com.google.inject.Key; @@ -11,12 +13,15 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.core.env.Environment; +import java.io.File; import java.util.Optional; import java.util.Set; @Slf4j public class PluginCommon { + private static final ObjectMapper yamlFactory = new ObjectMapper(new YAMLFactory()); + private PluginCommon() {} public static Optional getPluginByName(Injector injector, String pluginName) @@ -31,6 +36,7 @@ public class PluginCommon return pluginOptional; } + @Deprecated public static IConfigure loadConfigure(String type, String plugin, String resource, Environment environment) { String root = environment.getProperty("spring.config.location"); @@ -55,4 +61,31 @@ public class PluginCommon } return configure; } + + public static IConfigure loadYamlConfigure(String type, String plugin, String resource, Environment environment) + { + String root = environment.getProperty("spring.config.location"); + if (!resource.endsWith(".yaml")) { + resource = resource + ".yaml"; + } + String path = root + String.format("plugins/%s/%s", type.toLowerCase(), resource.toLowerCase()); + File file = new File(path); + if (!file.exists()) { + log.warn("Plugin {} type {} configuration file {} not found, load default configuration file", plugin, type, resource); + file = new File(root + "plugins/default.yaml"); + } + else { + log.info("Load plugin {} type {} resource {} configure file path {}", plugin, type, resource, path); + } + yamlFactory.findAndRegisterModules(); + IConfigure configure = null; + try { + configure = yamlFactory.readValue(file, IConfigure.class); + } + catch (Exception e) { + log.error("Format configuration file, it may be a bug, please submit issues to solve it. plugin {} type {} resource {} configure file path {} message ", plugin, type, resource, path, e); + Preconditions.checkArgument(StringUtils.isNotEmpty(path), "Format configuration file, it may be a bug, please submit issues to solve it."); + } + return configure; + } } diff --git a/core/datacap-server/src/main/java/io/edurt/datacap/server/common/ServiceState.java b/core/datacap-server/src/main/java/io/edurt/datacap/server/common/ServiceState.java index c8051b9d..8b9f378a 100644 --- a/core/datacap-server/src/main/java/io/edurt/datacap/server/common/ServiceState.java +++ b/core/datacap-server/src/main/java/io/edurt/datacap/server/common/ServiceState.java @@ -4,6 +4,8 @@ public enum ServiceState { SOURCE_NOT_FOUND(1001, "Source does not exist"), SOURCE_NOT_SUPPORTED(1002, "The current data source is not supported"), + SOURCE_NOT_SUPPORTED_PIPELINE(1003, "The current data source does not support pipeline"), + SOURCE_NOT_SUPPORTED_PIPELINE_TYPE(1004, "The current data source does not support pipeline type"), PLUGIN_NOT_FOUND(2001, "Plugin dose not exists"), PLUGIN_EXECUTE_FAILED(2002, "Plugin execute failed"), PLUGIN_ONLY_ONE_TEMPLATE(2003, "Plug-ins support only templates with the same name"), diff --git a/core/datacap-server/src/main/java/io/edurt/datacap/server/controller/user/PipelineController.java b/core/datacap-server/src/main/java/io/edurt/datacap/server/controller/user/PipelineController.java index ede858f0..7363d4a9 100644 --- a/core/datacap-server/src/main/java/io/edurt/datacap/server/controller/user/PipelineController.java +++ b/core/datacap-server/src/main/java/io/edurt/datacap/server/controller/user/PipelineController.java @@ -4,6 +4,7 @@ import io.edurt.datacap.server.body.PipelineBody; import io.edurt.datacap.server.common.Response; import io.edurt.datacap.server.service.PipelineService; import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -19,7 +20,7 @@ public class PipelineController } @PostMapping(value = "/create") - public Response create(PipelineBody configure) + public Response create(@RequestBody PipelineBody configure) { return pipelineService.submit(configure); } diff --git a/core/datacap-server/src/main/java/io/edurt/datacap/server/plugin/configure/IConfigureExecutor.java b/core/datacap-server/src/main/java/io/edurt/datacap/server/plugin/configure/IConfigureExecutor.java index d8636eab..9cc50fc8 100644 --- a/core/datacap-server/src/main/java/io/edurt/datacap/server/plugin/configure/IConfigureExecutor.java +++ b/core/datacap-server/src/main/java/io/edurt/datacap/server/plugin/configure/IConfigureExecutor.java @@ -14,6 +14,6 @@ import java.util.List; public class IConfigureExecutor { private String executor; - private String type; + private IConfigurePipelineType type; private List fields; } diff --git a/core/datacap-server/src/main/java/io/edurt/datacap/server/plugin/configure/IConfigureExecutorField.java b/core/datacap-server/src/main/java/io/edurt/datacap/server/plugin/configure/IConfigureExecutorField.java index 5512bfb4..a72de6c7 100644 --- a/core/datacap-server/src/main/java/io/edurt/datacap/server/plugin/configure/IConfigureExecutorField.java +++ b/core/datacap-server/src/main/java/io/edurt/datacap/server/plugin/configure/IConfigureExecutorField.java @@ -12,5 +12,12 @@ import lombok.ToString; public class IConfigureExecutorField { private String field; + // The default is equal to the filed value, and the custom column name uses + private String origin; private boolean required; + /** + * If the flag is true, it means that the field is extracted through user configuration, and the default data will be discarded + */ + private boolean override; + private boolean input; // Is it an input parameter } diff --git a/core/datacap-server/src/main/java/io/edurt/datacap/server/plugin/configure/IConfigurePipelineType.java b/core/datacap-server/src/main/java/io/edurt/datacap/server/plugin/configure/IConfigurePipelineType.java new file mode 100644 index 00000000..7b12f6da --- /dev/null +++ b/core/datacap-server/src/main/java/io/edurt/datacap/server/plugin/configure/IConfigurePipelineType.java @@ -0,0 +1,7 @@ +package io.edurt.datacap.server.plugin.configure; + +public enum IConfigurePipelineType +{ + SOURCE, + SINK +} diff --git a/core/datacap-server/src/main/java/io/edurt/datacap/server/service/impl/PipelineServiceImpl.java b/core/datacap-server/src/main/java/io/edurt/datacap/server/service/impl/PipelineServiceImpl.java index 4f2e289f..61b71a28 100644 --- a/core/datacap-server/src/main/java/io/edurt/datacap/server/service/impl/PipelineServiceImpl.java +++ b/core/datacap-server/src/main/java/io/edurt/datacap/server/service/impl/PipelineServiceImpl.java @@ -11,20 +11,32 @@ import io.edurt.datacap.server.common.ServiceState; import io.edurt.datacap.server.entity.SourceEntity; import io.edurt.datacap.server.plugin.configure.IConfigure; import io.edurt.datacap.server.plugin.configure.IConfigureExecutor; +import io.edurt.datacap.server.plugin.configure.IConfigureExecutorField; +import io.edurt.datacap.server.plugin.configure.IConfigurePipelineType; import io.edurt.datacap.server.repository.SourceRepository; +import io.edurt.datacap.server.security.UserDetailsService; import io.edurt.datacap.server.service.PipelineService; import io.edurt.datacap.spi.executor.Executor; import io.edurt.datacap.spi.executor.Pipeline; import io.edurt.datacap.spi.executor.PipelineField; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.FileUtils; +import org.apache.commons.lang3.ObjectUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.time.DateFormatUtils; import org.springframework.core.env.Environment; import org.springframework.stereotype.Service; +import java.io.File; +import java.util.HashSet; +import java.util.List; +import java.util.Locale; import java.util.Optional; import java.util.Properties; import java.util.Set; -import java.util.UUID; @Service +@Slf4j public class PipelineServiceImpl implements PipelineService { @@ -42,28 +54,39 @@ public class PipelineServiceImpl @Override public Response submit(PipelineBody configure) { - Optional fromSourceOptional = repository.findById(configure.getFrom()); - Optional toSourceOptional = repository.findById(configure.getTo()); + Optional fromSourceOptional = repository.findById(configure.getFrom().getId()); + Optional toSourceOptional = repository.findById(configure.getTo().getId()); if (fromSourceOptional.isPresent() && toSourceOptional.isPresent()) { SourceEntity fromSource = fromSourceOptional.get(); - IConfigure fromConfigure = PluginCommon.loadConfigure(fromSource.getProtocol(), fromSource.getType(), fromSource.getType(), environment); + IConfigure fromConfigure = PluginCommon.loadYamlConfigure(fromSource.getProtocol(), fromSource.getType(), fromSource.getType(), environment); + // Check if Pipeline is supported + if (ObjectUtils.isEmpty(fromConfigure.getPipelines())) { + String message = String.format("Source %s is not supported pipeline, type %s", fromSource.getId(), fromSource.getType()); + return Response.failure(ServiceState.SOURCE_NOT_SUPPORTED_PIPELINE, message); + } Optional fromConfigureExecutor = fromConfigure.getPipelines() .stream() - .filter(v -> v.getExecutor().equals(configure.getExecutor())) + .filter(v -> v.getExecutor().equals(configure.getExecutor()) && v.getType().equals(IConfigurePipelineType.SOURCE)) .findFirst(); if (!fromConfigureExecutor.isPresent()) { - return Response.failure(ServiceState.PLUGIN_NOT_FOUND); + String message = String.format("Source %s type %s is not supported pipeline type %s", fromSource.getId(), fromSource.getType(), IConfigurePipelineType.SOURCE); + return Response.failure(ServiceState.SOURCE_NOT_SUPPORTED_PIPELINE_TYPE, message); } SourceEntity toSource = toSourceOptional.get(); - IConfigure toConfigure = PluginCommon.loadConfigure(toSource.getProtocol(), toSource.getType(), toSource.getType(), environment); + IConfigure toConfigure = PluginCommon.loadYamlConfigure(toSource.getProtocol(), toSource.getType(), toSource.getType(), environment); + if (ObjectUtils.isEmpty(toConfigure.getPipelines())) { + String message = String.format("Source %s is not supported pipeline, type %s", toSource.getId(), toSource.getType()); + return Response.failure(ServiceState.SOURCE_NOT_SUPPORTED_PIPELINE, message); + } Optional toConfigureExecutor = toConfigure.getPipelines() .stream() - .filter(v -> v.getExecutor().equals(configure.getExecutor())) + .filter(v -> v.getExecutor().equals(configure.getExecutor()) && v.getType().equals(IConfigurePipelineType.SINK)) .findFirst(); if (!toConfigureExecutor.isPresent()) { - return Response.failure(ServiceState.PLUGIN_NOT_FOUND); + String message = String.format("Source %s type %s is not supported pipeline type %s", toSource.getId(), toSource.getType(), IConfigurePipelineType.SINK); + return Response.failure(ServiceState.SOURCE_NOT_SUPPORTED_PIPELINE_TYPE, message); } Optional executorOptional = injector.getInstance(Key.get(new TypeLiteral>() {})) @@ -72,32 +95,94 @@ public class PipelineServiceImpl .findFirst(); // FROM source - Properties fromProperties = new Properties(); - Properties fromBeanProperties = BeanToPropertiesCommon.convertBeanToProperties(fromSource); - fromConfigureExecutor.get().getFields().forEach(pipelineField -> fromProperties.put(pipelineField.getField(), fromBeanProperties.get(pipelineField.getField()))); + Properties fromOriginProperties = configure.getFrom().getConfigures(); + fromOriginProperties.setProperty("context", configure.getContent()); + Properties fromProperties = this.merge(fromSource, fromConfigureExecutor.get().getFields(), fromOriginProperties); + Set fromOptions = new HashSet<>(); + fromConfigureExecutor.get() + .getFields() + .stream() + .filter(v -> v.isRequired()) + .forEach(v -> fromOptions.add(v.getField())); PipelineField fromField = PipelineField.builder() .type(fromSource.getType()) .configure(fromProperties) + .supportOptions(fromOptions) .build(); // TO source - Properties toProperties = new Properties(); - Properties toBeanProperties = BeanToPropertiesCommon.convertBeanToProperties(toSource); - toConfigureExecutor.get().getFields().forEach(pipelineField -> toProperties.put(pipelineField.getField(), toBeanProperties.get(pipelineField.getField()))); + Properties toOriginProperties = configure.getTo().getConfigures(); + Properties toProperties = this.merge(toSource, toConfigureExecutor.get().getFields(), toOriginProperties); + Set toOptions = new HashSet<>(); + toConfigureExecutor.get() + .getFields() + .stream() + .filter(v -> v.isRequired()) + .forEach(v -> toOptions.add(v.getField())); PipelineField toField = PipelineField.builder() .type(toSource.getType()) .configure(toProperties) + .supportOptions(toOptions) .build(); + String executorHome = environment.getProperty("datacap.executor.data"); + if (StringUtils.isEmpty(executorHome)) { + executorHome = String.join(File.separator, System.getProperty("user.dir"), "data"); + } + + String username = UserDetailsService.getUser().getUsername(); + String pipelineHome = DateFormatUtils.format(System.currentTimeMillis(), "yyyyMMddHHmmssSSS"); + String work = String.join(File.separator, executorHome, username, pipelineHome); + String pipelineName = String.join("_", username, configure.getExecutor().toLowerCase(), pipelineHome); + try { + FileUtils.forceMkdir(new File(work)); + } + catch (Exception e) { + log.warn("Failed to create temporary directory", e); + } Pipeline pipeline = Pipeline.builder() - .work(System.getenv("user.dir") + "/" + UUID.randomUUID().toString()) - .home(environment.getProperty("datacap.executor.seatunnel.home")) + .work(work) + .home(environment.getProperty(String.format("datacap.executor.%s.home", configure.getExecutor().toLowerCase(Locale.ROOT)))) + .pipelineName(pipelineName) + .username(UserDetailsService.getUser().getUsername()) .from(fromField) .to(toField) + .timeout(600) .build(); executorOptional.get().start(pipeline); return Response.success(null); } return Response.failure(ServiceState.SOURCE_NOT_FOUND); } + + private Properties merge(SourceEntity entity, List fields, Properties configure) + { + Properties properties = new Properties(); + Properties convertBeanProperties = BeanToPropertiesCommon.convertBeanToProperties(entity); + for (IConfigureExecutorField field : fields) { + if (field.isOverride()) { + this.setProperty(field, properties, configure); + } + else { + this.setProperty(field, properties, convertBeanProperties); + } + } + return properties; + } + + private void setProperty(IConfigureExecutorField field, Properties properties, Properties configure) + { + Object value = ""; + if (ObjectUtils.isNotEmpty(field.getOrigin())) { + if (ObjectUtils.isNotEmpty(configure.get(field.getOrigin()))) { + value = configure.get(field.getOrigin()); + } + } + else { + if (ObjectUtils.isNotEmpty(configure.get(field.getField()))) { + value = configure.get(field.getField()); + } + } + properties.put(field.getField(), value); + } } diff --git a/core/datacap-server/src/main/java/io/edurt/datacap/server/service/impl/SourceServiceImpl.java b/core/datacap-server/src/main/java/io/edurt/datacap/server/service/impl/SourceServiceImpl.java index 70c4e369..d6e0d839 100644 --- a/core/datacap-server/src/main/java/io/edurt/datacap/server/service/impl/SourceServiceImpl.java +++ b/core/datacap-server/src/main/java/io/edurt/datacap/server/service/impl/SourceServiceImpl.java @@ -123,7 +123,7 @@ public class SourceServiceImpl entity.setName(plugin.name()); entity.setDescription(plugin.description()); entity.setType(plugin.type().name()); - entity.setConfigure(PluginCommon.loadConfigure(plugin.type().name(), plugin.name(), plugin.name(), environment)); + entity.setConfigure(PluginCommon.loadYamlConfigure(plugin.type().name(), plugin.name(), plugin.name(), environment)); List plugins = pluginMap.get(plugin.type().name()); if (ObjectUtils.isEmpty(plugins)) { plugins = new ArrayList<>(); @@ -168,7 +168,7 @@ public class SourceServiceImpl } // Check configure - IConfigure iConfigure = PluginCommon.loadConfigure(configure.getType(), configure.getName(), configure.getName(), environment); + IConfigure iConfigure = PluginCommon.loadYamlConfigure(configure.getType(), configure.getName(), configure.getName(), environment); if (ObjectUtils.isEmpty(iConfigure) || iConfigure.getConfigures().size() != configure.getConfigure().getConfigures().size()) { return Response.failure(ServiceState.PLUGIN_CONFIGURE_MISMATCH); } @@ -201,7 +201,7 @@ public class SourceServiceImpl } // Check configure - IConfigure iConfigure = PluginCommon.loadConfigure(configure.getType(), configure.getName(), configure.getName(), environment); + IConfigure iConfigure = PluginCommon.loadYamlConfigure(configure.getType(), configure.getName(), configure.getName(), environment); if (ObjectUtils.isEmpty(iConfigure) || iConfigure.getConfigures().size() != configure.getConfigure().getConfigures().size()) { return Response.failure(ServiceState.PLUGIN_CONFIGURE_MISMATCH); } @@ -237,7 +237,7 @@ public class SourceServiceImpl configure.setName(entity.getType()); configure.setType(entity.getProtocol()); // Load default configure - IConfigure iConfigure = PluginCommon.loadConfigure(configure.getType(), configure.getName(), configure.getName(), environment); + IConfigure iConfigure = PluginCommon.loadYamlConfigure(configure.getType(), configure.getName(), configure.getName(), environment); configure.setConfigure(IConfigureCommon.preparedConfigure(iConfigure, entity)); entity.setSchema(iConfigure); return Response.success(entity); diff --git a/core/datacap-server/src/test/java/io/edurt/datacap/server/common/PluginCommonTest.java b/core/datacap-server/src/test/java/io/edurt/datacap/server/common/PluginCommonTest.java index ba1d0b35..31ad471a 100644 --- a/core/datacap-server/src/test/java/io/edurt/datacap/server/common/PluginCommonTest.java +++ b/core/datacap-server/src/test/java/io/edurt/datacap/server/common/PluginCommonTest.java @@ -9,12 +9,12 @@ import org.junit.Test; justification = "I prefer to suppress these FindBugs warnings") public class PluginCommonTest { - private String resource = "default.json"; + private String resource = "default.yaml"; @Test public void loadConfigure() { - IConfigure configure = PluginCommon.loadConfigure("JDBC", "MySQL", resource, null); + IConfigure configure = PluginCommon.loadYamlConfigure("JDBC", "MySQL", resource, null); Assert.assertNotNull(configure); } } \ No newline at end of file diff --git a/core/datacap-server/src/test/java/io/edurt/datacap/server/common/ResourceCommonTest.java b/core/datacap-server/src/test/java/io/edurt/datacap/server/common/ResourceCommonTest.java index 81ed42d0..4854f306 100644 --- a/core/datacap-server/src/test/java/io/edurt/datacap/server/common/ResourceCommonTest.java +++ b/core/datacap-server/src/test/java/io/edurt/datacap/server/common/ResourceCommonTest.java @@ -5,7 +5,7 @@ import org.junit.Test; public class ResourceCommonTest { - private String resource = "default.json"; + private String resource = "default.yaml"; private String resource2 = "empty.json"; @Test diff --git a/core/datacap-server/src/test/resources/default.json b/core/datacap-server/src/test/resources/default.json deleted file mode 100644 index 2c63c085..00000000 --- a/core/datacap-server/src/test/resources/default.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} diff --git a/core/datacap-server/src/test/resources/default.yaml b/core/datacap-server/src/test/resources/default.yaml new file mode 100644 index 00000000..e69de29b diff --git a/core/datacap-spi/src/main/java/io/edurt/datacap/spi/executor/Pipeline.java b/core/datacap-spi/src/main/java/io/edurt/datacap/spi/executor/Pipeline.java index f3044a41..540daef0 100644 --- a/core/datacap-spi/src/main/java/io/edurt/datacap/spi/executor/Pipeline.java +++ b/core/datacap-spi/src/main/java/io/edurt/datacap/spi/executor/Pipeline.java @@ -7,8 +7,6 @@ import lombok.Data; import lombok.NoArgsConstructor; import lombok.ToString; -import java.util.UUID; - @Data @Builder @ToString @@ -20,14 +18,9 @@ public class Pipeline { private String username; private String home; + private String pipelineName; private String work; - private String file; private long timeout = 600; private PipelineField from; private PipelineField to; - - public String getFile() - { - return String.join("/", this.getWork(), String.format("%s.configure", UUID.randomUUID().toString())); - } } diff --git a/core/datacap-spi/src/main/java/io/edurt/datacap/spi/executor/PipelineField.java b/core/datacap-spi/src/main/java/io/edurt/datacap/spi/executor/PipelineField.java index 22237bcd..e69e5dc3 100644 --- a/core/datacap-spi/src/main/java/io/edurt/datacap/spi/executor/PipelineField.java +++ b/core/datacap-spi/src/main/java/io/edurt/datacap/spi/executor/PipelineField.java @@ -5,6 +5,7 @@ import lombok.Data; import lombok.ToString; import java.util.Properties; +import java.util.Set; @Data @Builder @@ -13,4 +14,5 @@ public class PipelineField { private String type; private Properties configure; + private Set supportOptions; } diff --git a/executor/executor-seatunnel/src/main/java/io/edurt/datacap/executor/SeatunnelExecutor.java b/executor/executor-seatunnel/src/main/java/io/edurt/datacap/executor/SeatunnelExecutor.java index 0528e6c9..e3662e47 100644 --- a/executor/executor-seatunnel/src/main/java/io/edurt/datacap/executor/SeatunnelExecutor.java +++ b/executor/executor-seatunnel/src/main/java/io/edurt/datacap/executor/SeatunnelExecutor.java @@ -33,7 +33,8 @@ public class SeatunnelExecutor public void before(Pipeline configure) { JsonFactory jsonFactory = new JsonFactory(); - try (JsonGenerator jsonGenerator = jsonFactory.createGenerator(new File(configure.getFile()), JsonEncoding.UTF8)) { + String workFile = String.join(File.separator, configure.getWork(), configure.getPipelineName() + ".configure"); + try (JsonGenerator jsonGenerator = jsonFactory.createGenerator(new File(workFile), JsonEncoding.UTF8)) { jsonGenerator.setPrettyPrinter(new DefaultPrettyPrinter()); jsonGenerator.writeStartObject(); this.writeChild("source", jsonGenerator, configure.getFrom()); @@ -51,14 +52,16 @@ public class SeatunnelExecutor before(configure); SeaTunnelCommander commander = new SeaTunnelCommander( configure.getHome() + "/bin", - String.join("/", configure.getWork(), configure.getFile()), - configure.getUsername()); - LoggerExecutor loggerExecutor = new LogbackExecutor(configure.getWork(), configure.getUsername()); - ShellConfigure shellConfigure = new ShellConfigure(); - shellConfigure.setDirectory(configure.getWork()); - shellConfigure.setLoggerExecutor(loggerExecutor); - shellConfigure.setCommand(Arrays.asList(commander.toCommand())); - shellConfigure.setTimeout(configure.getTimeout()); + String.join(File.separator, configure.getWork(), configure.getPipelineName() + ".configure"), + configure.getPipelineName()); + LoggerExecutor loggerExecutor = new LogbackExecutor(configure.getWork(), configure.getPipelineName() + ".log"); + ShellConfigure shellConfigure = ShellConfigure.builder() + .directory(configure.getWork()) + .loggerExecutor(loggerExecutor) + .command(Arrays.asList(commander.toCommand())) + .timeout(configure.getTimeout()) + .username(configure.getUsername()) + .build(); ShellCommander shellExecutor = new ProcessBuilderCommander(shellConfigure); ShellResponse response = shellExecutor.execute(); if (!response.getSuccessful()) { @@ -81,5 +84,6 @@ public class SeatunnelExecutor } jsonGenerator.writeEndObject(); } + jsonGenerator.writeEndObject(); } } diff --git a/executor/executor-seatunnel/src/main/java/io/edurt/datacap/executor/connector/ConnectorClickHouse.java b/executor/executor-seatunnel/src/main/java/io/edurt/datacap/executor/connector/ConnectorClickHouse.java index 43e6aa2c..3a23a2d2 100644 --- a/executor/executor-seatunnel/src/main/java/io/edurt/datacap/executor/connector/ConnectorClickHouse.java +++ b/executor/executor-seatunnel/src/main/java/io/edurt/datacap/executor/connector/ConnectorClickHouse.java @@ -2,26 +2,15 @@ package io.edurt.datacap.executor.connector; import io.edurt.datacap.spi.executor.PipelineField; -import java.util.HashSet; import java.util.Map; -import java.util.Set; import java.util.concurrent.ConcurrentHashMap; public class ConnectorClickHouse extends Connector { - private static final Set supportOptions = new HashSet() - {{ - add("host"); - add("database"); - add("sql"); - add("username"); - add("password"); - }}; - public ConnectorClickHouse(ConnectorType type, PipelineField configure) { - super(type, configure, supportOptions); + super(type, configure, configure.getSupportOptions()); } @Override diff --git a/executor/executor-seatunnel/src/test/java/io/edurt/datacap/executor/SeatunnelExecutorTest.java b/executor/executor-seatunnel/src/test/java/io/edurt/datacap/executor/SeatunnelExecutorTest.java index 8019dbfb..1edc1f13 100644 --- a/executor/executor-seatunnel/src/test/java/io/edurt/datacap/executor/SeatunnelExecutorTest.java +++ b/executor/executor-seatunnel/src/test/java/io/edurt/datacap/executor/SeatunnelExecutorTest.java @@ -5,10 +5,20 @@ import io.edurt.datacap.spi.executor.PipelineField; import org.junit.Before; import org.junit.Test; +import java.util.HashSet; import java.util.Properties; +import java.util.Set; public class SeatunnelExecutorTest { + private static final Set supportOptions = new HashSet() + {{ + add("host"); + add("database"); + add("sql"); + add("username"); + add("password"); + }}; private Pipeline pipeline; @Before @@ -22,9 +32,11 @@ public class SeatunnelExecutorTest properties.put("password", "123456"); properties.put("database", "default"); properties.put("sql", "SHOW DATABASES"); + PipelineField from = PipelineField.builder() .type("ClickHouse") .configure(properties) + .supportOptions(supportOptions) .build(); pipeline.setFrom(from); pipeline.setTo(PipelineField.builder().type("Console").build()); diff --git a/lib/datacap-shell/src/main/java/io/edurt/datacap/lib/shell/ShellConfigure.java b/lib/datacap-shell/src/main/java/io/edurt/datacap/lib/shell/ShellConfigure.java index f0349387..9ba99db4 100644 --- a/lib/datacap-shell/src/main/java/io/edurt/datacap/lib/shell/ShellConfigure.java +++ b/lib/datacap-shell/src/main/java/io/edurt/datacap/lib/shell/ShellConfigure.java @@ -2,6 +2,7 @@ package io.edurt.datacap.lib.shell; import io.edurt.datacap.lib.logger.LoggerExecutor; import lombok.AllArgsConstructor; +import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import lombok.ToString; @@ -9,6 +10,7 @@ import lombok.ToString; import java.util.List; @Data +@Builder @ToString @NoArgsConstructor @AllArgsConstructor diff --git a/lib/datacap-shell/src/main/java/io/edurt/datacap/lib/shell/process/ProcessBuilderCommander.java b/lib/datacap-shell/src/main/java/io/edurt/datacap/lib/shell/process/ProcessBuilderCommander.java index 9fc8b015..70038127 100644 --- a/lib/datacap-shell/src/main/java/io/edurt/datacap/lib/shell/process/ProcessBuilderCommander.java +++ b/lib/datacap-shell/src/main/java/io/edurt/datacap/lib/shell/process/ProcessBuilderCommander.java @@ -34,6 +34,7 @@ public class ProcessBuilderCommander { LoggerExecutor loggerExecutor = this.configure.getLoggerExecutor(); Logger logger = (Logger) loggerExecutor.getLogger(); + logger.info("Execute pipeline on username {}", configure.getUsername()); ShellResponse shellResponse = new ShellResponse(); shellResponse.setSuccessful(Boolean.TRUE); List command = new ArrayList<>(); @@ -49,8 +50,9 @@ public class ProcessBuilderCommander logger.info("Work directory {}", configure.getDirectory()); Map environment = this.getEnvironment(); builder.environment().putAll(environment); - logger.info("========== container environment loading =========="); + logger.info("========== container environment start =========="); environment.keySet().forEach(key -> logger.info("Container environment {}={}", key, environment.get(key))); + logger.info("========== container environment end =========="); Process process = null; try { @@ -79,6 +81,9 @@ public class ProcessBuilderCommander } } shellResponse.setCode(process.exitValue()); + if (process.exitValue() > 0) { + shellResponse.setSuccessful(Boolean.FALSE); + } } catch (Exception ex) { logger.error("Execute failed ", ex); @@ -89,8 +94,8 @@ public class ProcessBuilderCommander process.destroy(); } logger.info("Execute response {}", shellResponse); - logger.info("Execute end destroy logger components"); loggerExecutor.destroy(); + logger.info("Execute end destroy logger components successful"); } return shellResponse; } From 5e97bc0ae9836e270e69584a13dd7e987e7815a3 Mon Sep 17 00:00:00 2001 From: qianmoQ Date: Tue, 14 Mar 2023 22:15:11 +0800 Subject: [PATCH 2/3] [Core] [AI] Support chatgpt for query --- core/datacap-web/console-fe/package.json | 1 + .../console-fe/src/i18n/langs/en/ai.ts | 6 + .../console-fe/src/i18n/langs/en/index.ts | 4 +- .../console-fe/src/i18n/langs/zhCn/ai.ts | 6 + .../console-fe/src/i18n/langs/zhCn/index.ts | 4 +- core/datacap-web/console-fe/src/main.ts | 2 + .../src/views/pages/query/QueryAiHelp.vue | 146 ++++++++++++++++++ .../src/views/pages/query/QueryHome.vue | 41 +++-- 8 files changed, 195 insertions(+), 15 deletions(-) create mode 100644 core/datacap-web/console-fe/src/i18n/langs/en/ai.ts create mode 100644 core/datacap-web/console-fe/src/i18n/langs/zhCn/ai.ts create mode 100644 core/datacap-web/console-fe/src/views/pages/query/QueryAiHelp.vue diff --git a/core/datacap-web/console-fe/package.json b/core/datacap-web/console-fe/package.json index c2fa7b5e..4f99fb7e 100644 --- a/core/datacap-web/console-fe/package.json +++ b/core/datacap-web/console-fe/package.json @@ -30,6 +30,7 @@ "vue-clipboard3": "^2.0.0", "vue-i18n": "^9.2.2", "vue-router": "^4.0.3", + "vue3-markdown": "^1.1.7", "watermark-dom": "^2.3.0", "webpack-bundle-analyzer": "^4.6.1" }, diff --git a/core/datacap-web/console-fe/src/i18n/langs/en/ai.ts b/core/datacap-web/console-fe/src/i18n/langs/en/ai.ts new file mode 100644 index 00000000..adc04e50 --- /dev/null +++ b/core/datacap-web/console-fe/src/i18n/langs/en/ai.ts @@ -0,0 +1,6 @@ +export default { + optimizeSQL: 'Optimize SQL', + optimizeSQLContent: 'Help me optimize the following SQL, the format is markdown', + analysisSQL: 'Analysis SQL', + analysisSQLContent: 'Help me analyze the following SQL, the format is markdown', +} diff --git a/core/datacap-web/console-fe/src/i18n/langs/en/index.ts b/core/datacap-web/console-fe/src/i18n/langs/en/index.ts index 572c238d..7ad6fcf1 100644 --- a/core/datacap-web/console-fe/src/i18n/langs/en/index.ts +++ b/core/datacap-web/console-fe/src/i18n/langs/en/index.ts @@ -8,6 +8,7 @@ import grid from "@/i18n/langs/en/grid"; import signup from "@/i18n/langs/en/signup"; import alert from "@/i18n/langs/en/alert"; import monitor from "@/i18n/langs/en/monitor"; +import ai from "@/i18n/langs/en/ai"; export default { ...en, @@ -19,5 +20,6 @@ export default { grid: grid, signup: signup, alert: alert, - monitor: monitor + monitor: monitor, + ai: ai } diff --git a/core/datacap-web/console-fe/src/i18n/langs/zhCn/ai.ts b/core/datacap-web/console-fe/src/i18n/langs/zhCn/ai.ts new file mode 100644 index 00000000..8b530be1 --- /dev/null +++ b/core/datacap-web/console-fe/src/i18n/langs/zhCn/ai.ts @@ -0,0 +1,6 @@ +export default { + optimizeSQL: '优化 SQL', + optimizeSQLContent: '帮我优化以下SQL,格式为markdown', + analysisSQL: '解析 SQL', + analysisSQLContent: '帮我解析以下SQL,格式为markdown', +} diff --git a/core/datacap-web/console-fe/src/i18n/langs/zhCn/index.ts b/core/datacap-web/console-fe/src/i18n/langs/zhCn/index.ts index 717228d2..43ee32a6 100644 --- a/core/datacap-web/console-fe/src/i18n/langs/zhCn/index.ts +++ b/core/datacap-web/console-fe/src/i18n/langs/zhCn/index.ts @@ -8,6 +8,7 @@ import grid from "@/i18n/langs/zhCn/grid"; import signup from "@/i18n/langs/zhCn/signup"; import alert from "@/i18n/langs/zhCn/alert"; import monitor from "@/i18n/langs/zhCn/monitor"; +import ai from "@/i18n/langs/zhCn/ai"; export default { ...zh, @@ -19,5 +20,6 @@ export default { grid: grid, signup: signup, alert: alert, - monitor: monitor + monitor: monitor, + ai: ai } diff --git a/core/datacap-web/console-fe/src/main.ts b/core/datacap-web/console-fe/src/main.ts index 8824b222..01a14b2c 100644 --- a/core/datacap-web/console-fe/src/main.ts +++ b/core/datacap-web/console-fe/src/main.ts @@ -5,6 +5,7 @@ import router from "./router"; import ViewUIPlus from 'view-ui-plus'; import 'view-ui-plus/dist/styles/viewuiplus.css'; +import VMdEditor from '@kangc/v-md-editor'; import VMdPreview from '@kangc/v-md-editor/lib/preview'; import '@kangc/v-md-editor/lib/style/preview.css'; import githubTheme from '@kangc/v-md-editor/lib/theme/github'; @@ -18,5 +19,6 @@ const app = createApp(App); app.use(router); app.use(ViewUIPlus); app.use(i18n); +app.use(VMdEditor); app.use(VMdPreview); app.mount("#app"); diff --git a/core/datacap-web/console-fe/src/views/pages/query/QueryAiHelp.vue b/core/datacap-web/console-fe/src/views/pages/query/QueryAiHelp.vue new file mode 100644 index 00000000..233b5c53 --- /dev/null +++ b/core/datacap-web/console-fe/src/views/pages/query/QueryAiHelp.vue @@ -0,0 +1,146 @@ + + + diff --git a/core/datacap-web/console-fe/src/views/pages/query/QueryHome.vue b/core/datacap-web/console-fe/src/views/pages/query/QueryHome.vue index 004b20f6..075fb2d9 100644 --- a/core/datacap-web/console-fe/src/views/pages/query/QueryHome.vue +++ b/core/datacap-web/console-fe/src/views/pages/query/QueryHome.vue @@ -14,11 +14,11 @@ + + + +
@@ -64,8 +70,8 @@ + :key="activeKey.value" @change="handlerChangeEditorValue" :width="'100%'" + v-model:value="activeEditorValue" @editorDidMount="handlerEditorDidMount($event, 'mysql')">
@@ -79,6 +85,7 @@ + @@ -100,6 +107,7 @@ import {AuditService} from "@/services/AuditService"; import FunctionsService from "@/services/settings/functions/FunctionsService"; import {useI18n} from "vue-i18n"; import DataLazyTree from "@/components/common/DataLazyTree.vue"; +import QueryAiHelp from "@/views/pages/query/QueryAiHelp.vue"; const editors = ref<{ title: string; key: string; closable?: boolean }[]>([ {title: 'Editor', key: '1', closable: false} @@ -110,7 +118,7 @@ const editorValueMap = new Map(); export default defineComponent({ name: "QueryHome", - components: {DataLazyTree, BasicTableComponent, SnippetDetails, SourceSelect, MonacoEditor}, + components: {QueryAiHelp, DataLazyTree, BasicTableComponent, SnippetDetails, SourceSelect, MonacoEditor}, unmounted() { if (this.editorCompletionProvider) { @@ -140,17 +148,19 @@ export default defineComponent({ activeEditorValue: '', editors, activeKey, - editorValueMap + editorValueMap, + visibleAiHelp: false } }, created() { this.handlerInitialize(); }, - mounted(){ - window.onresize=()=>{ - if(editorMap.values().next().value){ - editorMap.values().next().value.layout({width: this.$refs.editorContainer.offsetWidth,height:300}) + mounted() + { + window.onresize = () => { + if (editorMap.values().next().value) { + editorMap.values().next().value.layout({width: this.$refs.editorContainer.offsetWidth, height: 300}) } } }, @@ -236,9 +246,9 @@ export default defineComponent({ }); } }); - setTimeout(()=>{ - editorMap.values().next().value?.layout({width: this.$refs.editorContainer.offsetWidth,height:300}) - },200) + setTimeout(() => { + editorMap.values().next().value?.layout({width: this.$refs.editorContainer.offsetWidth, height: 300}) + }, 200) }, handlerRun() { @@ -348,6 +358,11 @@ export default defineComponent({ handlerChangeEditorValue(value: string) { editorValueMap.set(activeKey.value, value); + }, + handlerVisibleHelp(value: boolean) + { + this.visibleAiHelp = value; + console.log(1) } }, // Prevents errors from affecting other components From 606aefc5e9aee9f537ccfcbed3604957d1f483ed Mon Sep 17 00:00:00 2001 From: qianmoQ Date: Tue, 14 Mar 2023 22:21:13 +0800 Subject: [PATCH 3/3] [Core] [Parser] Updated to `4.12.0` --- .../io/edurt/datacap/sql/parser/SqlBase.g4 | 1 + .../edurt/datacap/sql/parser/SqlBase.interp | 2 +- .../sql/parser/SqlBaseBaseListener.java | 3 +- .../sql/parser/SqlBaseBaseVisitor.java | 3 +- .../datacap/sql/parser/SqlBaseLexer.interp | 2 +- .../datacap/sql/parser/SqlBaseLexer.java | 162 ++++++++++++------ .../datacap/sql/parser/SqlBaseListener.java | 2 +- .../datacap/sql/parser/SqlBaseParser.java | 87 +++++++--- .../datacap/sql/parser/SqlBaseVisitor.java | 2 +- 9 files changed, 178 insertions(+), 86 deletions(-) diff --git a/core/datacap-parser/src/main/antlr4/io/edurt/datacap/sql/parser/SqlBase.g4 b/core/datacap-parser/src/main/antlr4/io/edurt/datacap/sql/parser/SqlBase.g4 index 9b797d49..cf4e418c 100644 --- a/core/datacap-parser/src/main/antlr4/io/edurt/datacap/sql/parser/SqlBase.g4 +++ b/core/datacap-parser/src/main/antlr4/io/edurt/datacap/sql/parser/SqlBase.g4 @@ -50,6 +50,7 @@ STRING IDENTIFIER : (LETTER | DIGIT | '_')+ ; + BACKQUOTED_IDENTIFIER : '`' ( ~'`' | '``' )* '`' ; diff --git a/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBase.interp b/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBase.interp index 1e29f7b4..d6b1b5a5 100644 --- a/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBase.interp +++ b/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBase.interp @@ -48,4 +48,4 @@ quotedIdentifier atn: -[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 16, 86, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 3, 2, 7, 2, 28, 10, 2, 12, 2, 14, 2, 31, 11, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 40, 10, 3, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 5, 5, 50, 10, 5, 3, 6, 3, 6, 5, 6, 54, 10, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 5, 8, 61, 10, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 7, 11, 71, 10, 11, 12, 11, 14, 11, 74, 11, 11, 3, 12, 3, 12, 3, 12, 7, 12, 79, 10, 12, 12, 12, 14, 12, 82, 11, 12, 3, 13, 3, 13, 3, 13, 2, 2, 14, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 2, 2, 2, 83, 2, 29, 3, 2, 2, 2, 4, 39, 3, 2, 2, 2, 6, 41, 3, 2, 2, 2, 8, 49, 3, 2, 2, 2, 10, 53, 3, 2, 2, 2, 12, 55, 3, 2, 2, 2, 14, 60, 3, 2, 2, 2, 16, 62, 3, 2, 2, 2, 18, 64, 3, 2, 2, 2, 20, 67, 3, 2, 2, 2, 22, 80, 3, 2, 2, 2, 24, 83, 3, 2, 2, 2, 26, 28, 5, 4, 3, 2, 27, 26, 3, 2, 2, 2, 28, 31, 3, 2, 2, 2, 29, 27, 3, 2, 2, 2, 29, 30, 3, 2, 2, 2, 30, 3, 3, 2, 2, 2, 31, 29, 3, 2, 2, 2, 32, 33, 7, 4, 2, 2, 33, 40, 5, 14, 8, 2, 34, 35, 7, 8, 2, 2, 35, 36, 5, 16, 9, 2, 36, 37, 5, 18, 10, 2, 37, 40, 3, 2, 2, 2, 38, 40, 5, 12, 7, 2, 39, 32, 3, 2, 2, 2, 39, 34, 3, 2, 2, 2, 39, 38, 3, 2, 2, 2, 40, 5, 3, 2, 2, 2, 41, 42, 7, 4, 2, 2, 42, 43, 7, 6, 2, 2, 43, 7, 3, 2, 2, 2, 44, 45, 7, 4, 2, 2, 45, 50, 7, 7, 2, 2, 46, 47, 7, 4, 2, 2, 47, 48, 7, 7, 2, 2, 48, 50, 5, 18, 10, 2, 49, 44, 3, 2, 2, 2, 49, 46, 3, 2, 2, 2, 50, 9, 3, 2, 2, 2, 51, 54, 5, 6, 4, 2, 52, 54, 5, 8, 5, 2, 53, 51, 3, 2, 2, 2, 53, 52, 3, 2, 2, 2, 54, 11, 3, 2, 2, 2, 55, 56, 5, 10, 6, 2, 56, 13, 3, 2, 2, 2, 57, 61, 7, 5, 2, 2, 58, 59, 7, 5, 2, 2, 59, 61, 5, 18, 10, 2, 60, 57, 3, 2, 2, 2, 60, 58, 3, 2, 2, 2, 61, 15, 3, 2, 2, 2, 62, 63, 5, 22, 12, 2, 63, 17, 3, 2, 2, 2, 64, 65, 7, 9, 2, 2, 65, 66, 5, 20, 11, 2, 66, 19, 3, 2, 2, 2, 67, 72, 5, 22, 12, 2, 68, 69, 7, 3, 2, 2, 69, 71, 5, 22, 12, 2, 70, 68, 3, 2, 2, 2, 71, 74, 3, 2, 2, 2, 72, 70, 3, 2, 2, 2, 72, 73, 3, 2, 2, 2, 73, 21, 3, 2, 2, 2, 74, 72, 3, 2, 2, 2, 75, 79, 7, 11, 2, 2, 76, 79, 7, 10, 2, 2, 77, 79, 5, 24, 13, 2, 78, 75, 3, 2, 2, 2, 78, 76, 3, 2, 2, 2, 78, 77, 3, 2, 2, 2, 79, 82, 3, 2, 2, 2, 80, 78, 3, 2, 2, 2, 80, 81, 3, 2, 2, 2, 81, 23, 3, 2, 2, 2, 82, 80, 3, 2, 2, 2, 83, 84, 7, 12, 2, 2, 84, 25, 3, 2, 2, 2, 10, 29, 39, 49, 53, 60, 72, 78, 80] \ No newline at end of file +[4, 1, 14, 84, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 1, 0, 5, 0, 26, 8, 0, 10, 0, 12, 0, 29, 9, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 38, 8, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 48, 8, 3, 1, 4, 1, 4, 3, 4, 52, 8, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 3, 6, 59, 8, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 5, 9, 69, 8, 9, 10, 9, 12, 9, 72, 9, 9, 1, 10, 1, 10, 1, 10, 5, 10, 77, 8, 10, 10, 10, 12, 10, 80, 9, 10, 1, 11, 1, 11, 1, 11, 0, 0, 12, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 0, 0, 81, 0, 27, 1, 0, 0, 0, 2, 37, 1, 0, 0, 0, 4, 39, 1, 0, 0, 0, 6, 47, 1, 0, 0, 0, 8, 51, 1, 0, 0, 0, 10, 53, 1, 0, 0, 0, 12, 58, 1, 0, 0, 0, 14, 60, 1, 0, 0, 0, 16, 62, 1, 0, 0, 0, 18, 65, 1, 0, 0, 0, 20, 78, 1, 0, 0, 0, 22, 81, 1, 0, 0, 0, 24, 26, 3, 2, 1, 0, 25, 24, 1, 0, 0, 0, 26, 29, 1, 0, 0, 0, 27, 25, 1, 0, 0, 0, 27, 28, 1, 0, 0, 0, 28, 1, 1, 0, 0, 0, 29, 27, 1, 0, 0, 0, 30, 31, 5, 2, 0, 0, 31, 38, 3, 12, 6, 0, 32, 33, 5, 6, 0, 0, 33, 34, 3, 14, 7, 0, 34, 35, 3, 16, 8, 0, 35, 38, 1, 0, 0, 0, 36, 38, 3, 10, 5, 0, 37, 30, 1, 0, 0, 0, 37, 32, 1, 0, 0, 0, 37, 36, 1, 0, 0, 0, 38, 3, 1, 0, 0, 0, 39, 40, 5, 2, 0, 0, 40, 41, 5, 4, 0, 0, 41, 5, 1, 0, 0, 0, 42, 43, 5, 2, 0, 0, 43, 48, 5, 5, 0, 0, 44, 45, 5, 2, 0, 0, 45, 46, 5, 5, 0, 0, 46, 48, 3, 16, 8, 0, 47, 42, 1, 0, 0, 0, 47, 44, 1, 0, 0, 0, 48, 7, 1, 0, 0, 0, 49, 52, 3, 4, 2, 0, 50, 52, 3, 6, 3, 0, 51, 49, 1, 0, 0, 0, 51, 50, 1, 0, 0, 0, 52, 9, 1, 0, 0, 0, 53, 54, 3, 8, 4, 0, 54, 11, 1, 0, 0, 0, 55, 59, 5, 3, 0, 0, 56, 57, 5, 3, 0, 0, 57, 59, 3, 16, 8, 0, 58, 55, 1, 0, 0, 0, 58, 56, 1, 0, 0, 0, 59, 13, 1, 0, 0, 0, 60, 61, 3, 20, 10, 0, 61, 15, 1, 0, 0, 0, 62, 63, 5, 7, 0, 0, 63, 64, 3, 18, 9, 0, 64, 17, 1, 0, 0, 0, 65, 70, 3, 20, 10, 0, 66, 67, 5, 1, 0, 0, 67, 69, 3, 20, 10, 0, 68, 66, 1, 0, 0, 0, 69, 72, 1, 0, 0, 0, 70, 68, 1, 0, 0, 0, 70, 71, 1, 0, 0, 0, 71, 19, 1, 0, 0, 0, 72, 70, 1, 0, 0, 0, 73, 77, 5, 9, 0, 0, 74, 77, 5, 8, 0, 0, 75, 77, 3, 22, 11, 0, 76, 73, 1, 0, 0, 0, 76, 74, 1, 0, 0, 0, 76, 75, 1, 0, 0, 0, 77, 80, 1, 0, 0, 0, 78, 76, 1, 0, 0, 0, 78, 79, 1, 0, 0, 0, 79, 21, 1, 0, 0, 0, 80, 78, 1, 0, 0, 0, 81, 82, 5, 10, 0, 0, 82, 23, 1, 0, 0, 0, 8, 27, 37, 47, 51, 58, 70, 76, 78] \ No newline at end of file diff --git a/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseBaseListener.java b/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseBaseListener.java index 13b9fa72..65b50550 100644 --- a/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseBaseListener.java +++ b/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseBaseListener.java @@ -1,4 +1,4 @@ -// Generated from io/edurt/datacap/sql/parser/SqlBase.g4 by ANTLR 4.9.3 +// Generated from io/edurt/datacap/sql/parser/SqlBase.g4 by ANTLR 4.12.0 package io.edurt.datacap.sql.parser; import org.antlr.v4.runtime.ParserRuleContext; @@ -10,6 +10,7 @@ import org.antlr.v4.runtime.tree.TerminalNode; * which can be extended to create a listener which only needs to handle a subset * of the available methods. */ +@SuppressWarnings("CheckReturnValue") public class SqlBaseBaseListener implements SqlBaseListener { /** * {@inheritDoc} diff --git a/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseBaseVisitor.java b/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseBaseVisitor.java index 6ee96845..0b54b22a 100644 --- a/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseBaseVisitor.java +++ b/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseBaseVisitor.java @@ -1,4 +1,4 @@ -// Generated from io/edurt/datacap/sql/parser/SqlBase.g4 by ANTLR 4.9.3 +// Generated from io/edurt/datacap/sql/parser/SqlBase.g4 by ANTLR 4.12.0 package io.edurt.datacap.sql.parser; import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; @@ -10,6 +10,7 @@ import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; * @param The return type of the visit operation. Use {@link Void} for * operations with no return type. */ +@SuppressWarnings("CheckReturnValue") public class SqlBaseBaseVisitor extends AbstractParseTreeVisitor implements SqlBaseVisitor { /** * {@inheritDoc} diff --git a/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseLexer.interp b/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseLexer.interp index 0274f23d..234adc53 100644 --- a/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseLexer.interp +++ b/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseLexer.interp @@ -58,4 +58,4 @@ mode names: DEFAULT_MODE atn: -[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 16, 168, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 7, 11, 86, 10, 11, 12, 11, 14, 11, 89, 11, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 7, 11, 96, 10, 11, 12, 11, 14, 11, 99, 11, 11, 3, 11, 3, 11, 5, 11, 103, 10, 11, 3, 12, 3, 12, 3, 12, 6, 12, 108, 10, 12, 13, 12, 14, 12, 109, 3, 13, 3, 13, 3, 13, 3, 13, 7, 13, 116, 10, 13, 12, 13, 14, 13, 119, 11, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 7, 14, 127, 10, 14, 12, 14, 14, 14, 130, 11, 14, 3, 14, 5, 14, 133, 10, 14, 3, 14, 5, 14, 136, 10, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 7, 16, 152, 10, 16, 12, 16, 14, 16, 155, 11, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 6, 17, 163, 10, 17, 13, 17, 14, 17, 164, 3, 17, 3, 17, 3, 153, 2, 18, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 2, 19, 2, 21, 10, 23, 11, 25, 12, 27, 13, 29, 14, 31, 15, 33, 16, 3, 2, 23, 4, 2, 85, 85, 117, 117, 4, 2, 74, 74, 106, 106, 4, 2, 81, 81, 113, 113, 4, 2, 89, 89, 121, 121, 4, 2, 82, 82, 114, 114, 4, 2, 67, 67, 99, 99, 4, 2, 86, 86, 118, 118, 4, 2, 71, 71, 103, 103, 4, 2, 78, 78, 110, 110, 4, 2, 69, 69, 101, 101, 4, 2, 72, 72, 104, 104, 4, 2, 84, 84, 116, 116, 4, 2, 79, 79, 111, 111, 3, 2, 50, 59, 4, 2, 67, 92, 99, 124, 4, 2, 41, 41, 94, 94, 4, 2, 36, 36, 94, 94, 3, 2, 98, 98, 4, 2, 12, 12, 15, 15, 3, 2, 45, 45, 5, 2, 11, 12, 15, 15, 34, 34, 2, 181, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 3, 35, 3, 2, 2, 2, 5, 37, 3, 2, 2, 2, 7, 42, 3, 2, 2, 2, 9, 48, 3, 2, 2, 2, 11, 55, 3, 2, 2, 2, 13, 65, 3, 2, 2, 2, 15, 72, 3, 2, 2, 2, 17, 77, 3, 2, 2, 2, 19, 79, 3, 2, 2, 2, 21, 102, 3, 2, 2, 2, 23, 107, 3, 2, 2, 2, 25, 111, 3, 2, 2, 2, 27, 122, 3, 2, 2, 2, 29, 139, 3, 2, 2, 2, 31, 146, 3, 2, 2, 2, 33, 162, 3, 2, 2, 2, 35, 36, 7, 48, 2, 2, 36, 4, 3, 2, 2, 2, 37, 38, 9, 2, 2, 2, 38, 39, 9, 3, 2, 2, 39, 40, 9, 4, 2, 2, 40, 41, 9, 5, 2, 2, 41, 6, 3, 2, 2, 2, 42, 43, 9, 6, 2, 2, 43, 44, 9, 7, 2, 2, 44, 45, 9, 8, 2, 2, 45, 46, 9, 3, 2, 2, 46, 47, 9, 2, 2, 2, 47, 8, 3, 2, 2, 2, 48, 49, 7, 86, 2, 2, 49, 50, 7, 81, 2, 2, 50, 51, 7, 82, 2, 2, 51, 52, 7, 75, 2, 2, 52, 53, 7, 69, 2, 2, 53, 54, 7, 85, 2, 2, 54, 10, 3, 2, 2, 2, 55, 56, 7, 69, 2, 2, 56, 57, 7, 81, 2, 2, 57, 58, 7, 80, 2, 2, 58, 59, 7, 85, 2, 2, 59, 60, 7, 87, 2, 2, 60, 61, 7, 79, 2, 2, 61, 62, 7, 71, 2, 2, 62, 63, 7, 84, 2, 2, 63, 64, 7, 85, 2, 2, 64, 12, 3, 2, 2, 2, 65, 66, 9, 2, 2, 2, 66, 67, 9, 9, 2, 2, 67, 68, 9, 10, 2, 2, 68, 69, 9, 9, 2, 2, 69, 70, 9, 11, 2, 2, 70, 71, 9, 8, 2, 2, 71, 14, 3, 2, 2, 2, 72, 73, 9, 12, 2, 2, 73, 74, 9, 13, 2, 2, 74, 75, 9, 4, 2, 2, 75, 76, 9, 14, 2, 2, 76, 16, 3, 2, 2, 2, 77, 78, 9, 15, 2, 2, 78, 18, 3, 2, 2, 2, 79, 80, 9, 16, 2, 2, 80, 20, 3, 2, 2, 2, 81, 87, 7, 41, 2, 2, 82, 86, 10, 17, 2, 2, 83, 84, 7, 94, 2, 2, 84, 86, 11, 2, 2, 2, 85, 82, 3, 2, 2, 2, 85, 83, 3, 2, 2, 2, 86, 89, 3, 2, 2, 2, 87, 85, 3, 2, 2, 2, 87, 88, 3, 2, 2, 2, 88, 90, 3, 2, 2, 2, 89, 87, 3, 2, 2, 2, 90, 103, 7, 41, 2, 2, 91, 97, 7, 36, 2, 2, 92, 96, 10, 18, 2, 2, 93, 94, 7, 94, 2, 2, 94, 96, 11, 2, 2, 2, 95, 92, 3, 2, 2, 2, 95, 93, 3, 2, 2, 2, 96, 99, 3, 2, 2, 2, 97, 95, 3, 2, 2, 2, 97, 98, 3, 2, 2, 2, 98, 100, 3, 2, 2, 2, 99, 97, 3, 2, 2, 2, 100, 103, 7, 36, 2, 2, 101, 103, 7, 44, 2, 2, 102, 81, 3, 2, 2, 2, 102, 91, 3, 2, 2, 2, 102, 101, 3, 2, 2, 2, 103, 22, 3, 2, 2, 2, 104, 108, 5, 19, 10, 2, 105, 108, 5, 17, 9, 2, 106, 108, 7, 97, 2, 2, 107, 104, 3, 2, 2, 2, 107, 105, 3, 2, 2, 2, 107, 106, 3, 2, 2, 2, 108, 109, 3, 2, 2, 2, 109, 107, 3, 2, 2, 2, 109, 110, 3, 2, 2, 2, 110, 24, 3, 2, 2, 2, 111, 117, 7, 98, 2, 2, 112, 116, 10, 19, 2, 2, 113, 114, 7, 98, 2, 2, 114, 116, 7, 98, 2, 2, 115, 112, 3, 2, 2, 2, 115, 113, 3, 2, 2, 2, 116, 119, 3, 2, 2, 2, 117, 115, 3, 2, 2, 2, 117, 118, 3, 2, 2, 2, 118, 120, 3, 2, 2, 2, 119, 117, 3, 2, 2, 2, 120, 121, 7, 98, 2, 2, 121, 26, 3, 2, 2, 2, 122, 123, 7, 47, 2, 2, 123, 124, 7, 47, 2, 2, 124, 128, 3, 2, 2, 2, 125, 127, 10, 20, 2, 2, 126, 125, 3, 2, 2, 2, 127, 130, 3, 2, 2, 2, 128, 126, 3, 2, 2, 2, 128, 129, 3, 2, 2, 2, 129, 132, 3, 2, 2, 2, 130, 128, 3, 2, 2, 2, 131, 133, 7, 15, 2, 2, 132, 131, 3, 2, 2, 2, 132, 133, 3, 2, 2, 2, 133, 135, 3, 2, 2, 2, 134, 136, 7, 12, 2, 2, 135, 134, 3, 2, 2, 2, 135, 136, 3, 2, 2, 2, 136, 137, 3, 2, 2, 2, 137, 138, 8, 14, 2, 2, 138, 28, 3, 2, 2, 2, 139, 140, 7, 49, 2, 2, 140, 141, 7, 44, 2, 2, 141, 142, 7, 44, 2, 2, 142, 143, 7, 49, 2, 2, 143, 144, 3, 2, 2, 2, 144, 145, 8, 15, 2, 2, 145, 30, 3, 2, 2, 2, 146, 147, 7, 49, 2, 2, 147, 148, 7, 44, 2, 2, 148, 149, 3, 2, 2, 2, 149, 153, 10, 21, 2, 2, 150, 152, 11, 2, 2, 2, 151, 150, 3, 2, 2, 2, 152, 155, 3, 2, 2, 2, 153, 154, 3, 2, 2, 2, 153, 151, 3, 2, 2, 2, 154, 156, 3, 2, 2, 2, 155, 153, 3, 2, 2, 2, 156, 157, 7, 44, 2, 2, 157, 158, 7, 49, 2, 2, 158, 159, 3, 2, 2, 2, 159, 160, 8, 16, 2, 2, 160, 32, 3, 2, 2, 2, 161, 163, 9, 22, 2, 2, 162, 161, 3, 2, 2, 2, 163, 164, 3, 2, 2, 2, 164, 162, 3, 2, 2, 2, 164, 165, 3, 2, 2, 2, 165, 166, 3, 2, 2, 2, 166, 167, 8, 17, 2, 2, 167, 34, 3, 2, 2, 2, 17, 2, 85, 87, 95, 97, 102, 107, 109, 115, 117, 128, 132, 135, 153, 164, 3, 2, 3, 2] \ No newline at end of file +[4, 0, 14, 166, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 84, 8, 9, 10, 9, 12, 9, 87, 9, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 94, 8, 9, 10, 9, 12, 9, 97, 9, 9, 1, 9, 1, 9, 3, 9, 101, 8, 9, 1, 10, 1, 10, 1, 10, 4, 10, 106, 8, 10, 11, 10, 12, 10, 107, 1, 11, 1, 11, 1, 11, 1, 11, 5, 11, 114, 8, 11, 10, 11, 12, 11, 117, 9, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 5, 12, 125, 8, 12, 10, 12, 12, 12, 128, 9, 12, 1, 12, 3, 12, 131, 8, 12, 1, 12, 3, 12, 134, 8, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 150, 8, 14, 10, 14, 12, 14, 153, 9, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 4, 15, 161, 8, 15, 11, 15, 12, 15, 162, 1, 15, 1, 15, 1, 151, 0, 16, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 0, 17, 0, 19, 8, 21, 9, 23, 10, 25, 11, 27, 12, 29, 13, 31, 14, 1, 0, 21, 2, 0, 83, 83, 115, 115, 2, 0, 72, 72, 104, 104, 2, 0, 79, 79, 111, 111, 2, 0, 87, 87, 119, 119, 2, 0, 80, 80, 112, 112, 2, 0, 65, 65, 97, 97, 2, 0, 84, 84, 116, 116, 2, 0, 69, 69, 101, 101, 2, 0, 76, 76, 108, 108, 2, 0, 67, 67, 99, 99, 2, 0, 70, 70, 102, 102, 2, 0, 82, 82, 114, 114, 2, 0, 77, 77, 109, 109, 1, 0, 48, 57, 2, 0, 65, 90, 97, 122, 2, 0, 39, 39, 92, 92, 2, 0, 34, 34, 92, 92, 1, 0, 96, 96, 2, 0, 10, 10, 13, 13, 1, 0, 43, 43, 3, 0, 9, 10, 13, 13, 32, 32, 179, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 1, 33, 1, 0, 0, 0, 3, 35, 1, 0, 0, 0, 5, 40, 1, 0, 0, 0, 7, 46, 1, 0, 0, 0, 9, 53, 1, 0, 0, 0, 11, 63, 1, 0, 0, 0, 13, 70, 1, 0, 0, 0, 15, 75, 1, 0, 0, 0, 17, 77, 1, 0, 0, 0, 19, 100, 1, 0, 0, 0, 21, 105, 1, 0, 0, 0, 23, 109, 1, 0, 0, 0, 25, 120, 1, 0, 0, 0, 27, 137, 1, 0, 0, 0, 29, 144, 1, 0, 0, 0, 31, 160, 1, 0, 0, 0, 33, 34, 5, 46, 0, 0, 34, 2, 1, 0, 0, 0, 35, 36, 7, 0, 0, 0, 36, 37, 7, 1, 0, 0, 37, 38, 7, 2, 0, 0, 38, 39, 7, 3, 0, 0, 39, 4, 1, 0, 0, 0, 40, 41, 7, 4, 0, 0, 41, 42, 7, 5, 0, 0, 42, 43, 7, 6, 0, 0, 43, 44, 7, 1, 0, 0, 44, 45, 7, 0, 0, 0, 45, 6, 1, 0, 0, 0, 46, 47, 5, 84, 0, 0, 47, 48, 5, 79, 0, 0, 48, 49, 5, 80, 0, 0, 49, 50, 5, 73, 0, 0, 50, 51, 5, 67, 0, 0, 51, 52, 5, 83, 0, 0, 52, 8, 1, 0, 0, 0, 53, 54, 5, 67, 0, 0, 54, 55, 5, 79, 0, 0, 55, 56, 5, 78, 0, 0, 56, 57, 5, 83, 0, 0, 57, 58, 5, 85, 0, 0, 58, 59, 5, 77, 0, 0, 59, 60, 5, 69, 0, 0, 60, 61, 5, 82, 0, 0, 61, 62, 5, 83, 0, 0, 62, 10, 1, 0, 0, 0, 63, 64, 7, 0, 0, 0, 64, 65, 7, 7, 0, 0, 65, 66, 7, 8, 0, 0, 66, 67, 7, 7, 0, 0, 67, 68, 7, 9, 0, 0, 68, 69, 7, 6, 0, 0, 69, 12, 1, 0, 0, 0, 70, 71, 7, 10, 0, 0, 71, 72, 7, 11, 0, 0, 72, 73, 7, 2, 0, 0, 73, 74, 7, 12, 0, 0, 74, 14, 1, 0, 0, 0, 75, 76, 7, 13, 0, 0, 76, 16, 1, 0, 0, 0, 77, 78, 7, 14, 0, 0, 78, 18, 1, 0, 0, 0, 79, 85, 5, 39, 0, 0, 80, 84, 8, 15, 0, 0, 81, 82, 5, 92, 0, 0, 82, 84, 9, 0, 0, 0, 83, 80, 1, 0, 0, 0, 83, 81, 1, 0, 0, 0, 84, 87, 1, 0, 0, 0, 85, 83, 1, 0, 0, 0, 85, 86, 1, 0, 0, 0, 86, 88, 1, 0, 0, 0, 87, 85, 1, 0, 0, 0, 88, 101, 5, 39, 0, 0, 89, 95, 5, 34, 0, 0, 90, 94, 8, 16, 0, 0, 91, 92, 5, 92, 0, 0, 92, 94, 9, 0, 0, 0, 93, 90, 1, 0, 0, 0, 93, 91, 1, 0, 0, 0, 94, 97, 1, 0, 0, 0, 95, 93, 1, 0, 0, 0, 95, 96, 1, 0, 0, 0, 96, 98, 1, 0, 0, 0, 97, 95, 1, 0, 0, 0, 98, 101, 5, 34, 0, 0, 99, 101, 5, 42, 0, 0, 100, 79, 1, 0, 0, 0, 100, 89, 1, 0, 0, 0, 100, 99, 1, 0, 0, 0, 101, 20, 1, 0, 0, 0, 102, 106, 3, 17, 8, 0, 103, 106, 3, 15, 7, 0, 104, 106, 5, 95, 0, 0, 105, 102, 1, 0, 0, 0, 105, 103, 1, 0, 0, 0, 105, 104, 1, 0, 0, 0, 106, 107, 1, 0, 0, 0, 107, 105, 1, 0, 0, 0, 107, 108, 1, 0, 0, 0, 108, 22, 1, 0, 0, 0, 109, 115, 5, 96, 0, 0, 110, 114, 8, 17, 0, 0, 111, 112, 5, 96, 0, 0, 112, 114, 5, 96, 0, 0, 113, 110, 1, 0, 0, 0, 113, 111, 1, 0, 0, 0, 114, 117, 1, 0, 0, 0, 115, 113, 1, 0, 0, 0, 115, 116, 1, 0, 0, 0, 116, 118, 1, 0, 0, 0, 117, 115, 1, 0, 0, 0, 118, 119, 5, 96, 0, 0, 119, 24, 1, 0, 0, 0, 120, 121, 5, 45, 0, 0, 121, 122, 5, 45, 0, 0, 122, 126, 1, 0, 0, 0, 123, 125, 8, 18, 0, 0, 124, 123, 1, 0, 0, 0, 125, 128, 1, 0, 0, 0, 126, 124, 1, 0, 0, 0, 126, 127, 1, 0, 0, 0, 127, 130, 1, 0, 0, 0, 128, 126, 1, 0, 0, 0, 129, 131, 5, 13, 0, 0, 130, 129, 1, 0, 0, 0, 130, 131, 1, 0, 0, 0, 131, 133, 1, 0, 0, 0, 132, 134, 5, 10, 0, 0, 133, 132, 1, 0, 0, 0, 133, 134, 1, 0, 0, 0, 134, 135, 1, 0, 0, 0, 135, 136, 6, 12, 0, 0, 136, 26, 1, 0, 0, 0, 137, 138, 5, 47, 0, 0, 138, 139, 5, 42, 0, 0, 139, 140, 5, 42, 0, 0, 140, 141, 5, 47, 0, 0, 141, 142, 1, 0, 0, 0, 142, 143, 6, 13, 0, 0, 143, 28, 1, 0, 0, 0, 144, 145, 5, 47, 0, 0, 145, 146, 5, 42, 0, 0, 146, 147, 1, 0, 0, 0, 147, 151, 8, 19, 0, 0, 148, 150, 9, 0, 0, 0, 149, 148, 1, 0, 0, 0, 150, 153, 1, 0, 0, 0, 151, 152, 1, 0, 0, 0, 151, 149, 1, 0, 0, 0, 152, 154, 1, 0, 0, 0, 153, 151, 1, 0, 0, 0, 154, 155, 5, 42, 0, 0, 155, 156, 5, 47, 0, 0, 156, 157, 1, 0, 0, 0, 157, 158, 6, 14, 0, 0, 158, 30, 1, 0, 0, 0, 159, 161, 7, 20, 0, 0, 160, 159, 1, 0, 0, 0, 161, 162, 1, 0, 0, 0, 162, 160, 1, 0, 0, 0, 162, 163, 1, 0, 0, 0, 163, 164, 1, 0, 0, 0, 164, 165, 6, 15, 0, 0, 165, 32, 1, 0, 0, 0, 15, 0, 83, 85, 93, 95, 100, 105, 107, 113, 115, 126, 130, 133, 151, 162, 1, 0, 1, 0] \ No newline at end of file diff --git a/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseLexer.java b/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseLexer.java index d81cde32..b6010350 100644 --- a/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseLexer.java +++ b/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseLexer.java @@ -1,4 +1,4 @@ -// Generated from io/edurt/datacap/sql/parser/SqlBase.g4 by ANTLR 4.9.3 +// Generated from io/edurt/datacap/sql/parser/SqlBase.g4 by ANTLR 4.12.0 package io.edurt.datacap.sql.parser; import org.antlr.v4.runtime.Lexer; import org.antlr.v4.runtime.CharStream; @@ -9,9 +9,9 @@ import org.antlr.v4.runtime.atn.*; import org.antlr.v4.runtime.dfa.DFA; import org.antlr.v4.runtime.misc.*; -@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue"}) public class SqlBaseLexer extends Lexer { - static { RuntimeMetaData.checkVersion("4.9.3", RuntimeMetaData.VERSION); } + static { RuntimeMetaData.checkVersion("4.12.0", RuntimeMetaData.VERSION); } protected static final DFA[] _decisionToDFA; protected static final PredictionContextCache _sharedContextCache = @@ -110,58 +110,110 @@ public class SqlBaseLexer extends Lexer { public ATN getATN() { return _ATN; } public static final String _serializedATN = - "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\20\u00a8\b\1\4\2"+ - "\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4"+ - "\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\3\2\3"+ - "\2\3\3\3\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\5"+ - "\3\5\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3\7\3"+ - "\7\3\b\3\b\3\b\3\b\3\b\3\t\3\t\3\n\3\n\3\13\3\13\3\13\3\13\7\13V\n\13"+ - "\f\13\16\13Y\13\13\3\13\3\13\3\13\3\13\3\13\7\13`\n\13\f\13\16\13c\13"+ - "\13\3\13\3\13\5\13g\n\13\3\f\3\f\3\f\6\fl\n\f\r\f\16\fm\3\r\3\r\3\r\3"+ - "\r\7\rt\n\r\f\r\16\rw\13\r\3\r\3\r\3\16\3\16\3\16\3\16\7\16\177\n\16\f"+ - "\16\16\16\u0082\13\16\3\16\5\16\u0085\n\16\3\16\5\16\u0088\n\16\3\16\3"+ - "\16\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\20\3\20\3\20\3\20\3\20\7\20\u0098"+ - "\n\20\f\20\16\20\u009b\13\20\3\20\3\20\3\20\3\20\3\20\3\21\6\21\u00a3"+ - "\n\21\r\21\16\21\u00a4\3\21\3\21\3\u0099\2\22\3\3\5\4\7\5\t\6\13\7\r\b"+ - "\17\t\21\2\23\2\25\n\27\13\31\f\33\r\35\16\37\17!\20\3\2\27\4\2UUuu\4"+ - "\2JJjj\4\2QQqq\4\2YYyy\4\2RRrr\4\2CCcc\4\2VVvv\4\2GGgg\4\2NNnn\4\2EEe"+ - "e\4\2HHhh\4\2TTtt\4\2OOoo\3\2\62;\4\2C\\c|\4\2))^^\4\2$$^^\3\2bb\4\2\f"+ - "\f\17\17\3\2--\5\2\13\f\17\17\"\"\2\u00b5\2\3\3\2\2\2\2\5\3\2\2\2\2\7"+ - "\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\25\3\2\2"+ - "\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2"+ - "!\3\2\2\2\3#\3\2\2\2\5%\3\2\2\2\7*\3\2\2\2\t\60\3\2\2\2\13\67\3\2\2\2"+ - "\rA\3\2\2\2\17H\3\2\2\2\21M\3\2\2\2\23O\3\2\2\2\25f\3\2\2\2\27k\3\2\2"+ - "\2\31o\3\2\2\2\33z\3\2\2\2\35\u008b\3\2\2\2\37\u0092\3\2\2\2!\u00a2\3"+ - "\2\2\2#$\7\60\2\2$\4\3\2\2\2%&\t\2\2\2&\'\t\3\2\2\'(\t\4\2\2()\t\5\2\2"+ - ")\6\3\2\2\2*+\t\6\2\2+,\t\7\2\2,-\t\b\2\2-.\t\3\2\2./\t\2\2\2/\b\3\2\2"+ - "\2\60\61\7V\2\2\61\62\7Q\2\2\62\63\7R\2\2\63\64\7K\2\2\64\65\7E\2\2\65"+ - "\66\7U\2\2\66\n\3\2\2\2\678\7E\2\289\7Q\2\29:\7P\2\2:;\7U\2\2;<\7W\2\2"+ - "<=\7O\2\2=>\7G\2\2>?\7T\2\2?@\7U\2\2@\f\3\2\2\2AB\t\2\2\2BC\t\t\2\2CD"+ - "\t\n\2\2DE\t\t\2\2EF\t\13\2\2FG\t\b\2\2G\16\3\2\2\2HI\t\f\2\2IJ\t\r\2"+ - "\2JK\t\4\2\2KL\t\16\2\2L\20\3\2\2\2MN\t\17\2\2N\22\3\2\2\2OP\t\20\2\2"+ - "P\24\3\2\2\2QW\7)\2\2RV\n\21\2\2ST\7^\2\2TV\13\2\2\2UR\3\2\2\2US\3\2\2"+ - "\2VY\3\2\2\2WU\3\2\2\2WX\3\2\2\2XZ\3\2\2\2YW\3\2\2\2Zg\7)\2\2[a\7$\2\2"+ - "\\`\n\22\2\2]^\7^\2\2^`\13\2\2\2_\\\3\2\2\2_]\3\2\2\2`c\3\2\2\2a_\3\2"+ - "\2\2ab\3\2\2\2bd\3\2\2\2ca\3\2\2\2dg\7$\2\2eg\7,\2\2fQ\3\2\2\2f[\3\2\2"+ - "\2fe\3\2\2\2g\26\3\2\2\2hl\5\23\n\2il\5\21\t\2jl\7a\2\2kh\3\2\2\2ki\3"+ - "\2\2\2kj\3\2\2\2lm\3\2\2\2mk\3\2\2\2mn\3\2\2\2n\30\3\2\2\2ou\7b\2\2pt"+ - "\n\23\2\2qr\7b\2\2rt\7b\2\2sp\3\2\2\2sq\3\2\2\2tw\3\2\2\2us\3\2\2\2uv"+ - "\3\2\2\2vx\3\2\2\2wu\3\2\2\2xy\7b\2\2y\32\3\2\2\2z{\7/\2\2{|\7/\2\2|\u0080"+ - "\3\2\2\2}\177\n\24\2\2~}\3\2\2\2\177\u0082\3\2\2\2\u0080~\3\2\2\2\u0080"+ - "\u0081\3\2\2\2\u0081\u0084\3\2\2\2\u0082\u0080\3\2\2\2\u0083\u0085\7\17"+ - "\2\2\u0084\u0083\3\2\2\2\u0084\u0085\3\2\2\2\u0085\u0087\3\2\2\2\u0086"+ - "\u0088\7\f\2\2\u0087\u0086\3\2\2\2\u0087\u0088\3\2\2\2\u0088\u0089\3\2"+ - "\2\2\u0089\u008a\b\16\2\2\u008a\34\3\2\2\2\u008b\u008c\7\61\2\2\u008c"+ - "\u008d\7,\2\2\u008d\u008e\7,\2\2\u008e\u008f\7\61\2\2\u008f\u0090\3\2"+ - "\2\2\u0090\u0091\b\17\2\2\u0091\36\3\2\2\2\u0092\u0093\7\61\2\2\u0093"+ - "\u0094\7,\2\2\u0094\u0095\3\2\2\2\u0095\u0099\n\25\2\2\u0096\u0098\13"+ - "\2\2\2\u0097\u0096\3\2\2\2\u0098\u009b\3\2\2\2\u0099\u009a\3\2\2\2\u0099"+ - "\u0097\3\2\2\2\u009a\u009c\3\2\2\2\u009b\u0099\3\2\2\2\u009c\u009d\7,"+ - "\2\2\u009d\u009e\7\61\2\2\u009e\u009f\3\2\2\2\u009f\u00a0\b\20\2\2\u00a0"+ - " \3\2\2\2\u00a1\u00a3\t\26\2\2\u00a2\u00a1\3\2\2\2\u00a3\u00a4\3\2\2\2"+ - "\u00a4\u00a2\3\2\2\2\u00a4\u00a5\3\2\2\2\u00a5\u00a6\3\2\2\2\u00a6\u00a7"+ - "\b\21\2\2\u00a7\"\3\2\2\2\21\2UW_afkmsu\u0080\u0084\u0087\u0099\u00a4"+ - "\3\2\3\2"; + "\u0004\u0000\u000e\u00a6\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002"+ + "\u0001\u0007\u0001\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002"+ + "\u0004\u0007\u0004\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002"+ + "\u0007\u0007\u0007\u0002\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002"+ + "\u000b\u0007\u000b\u0002\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e"+ + "\u0002\u000f\u0007\u000f\u0001\u0000\u0001\u0000\u0001\u0001\u0001\u0001"+ + "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0002\u0001\u0002\u0001\u0002"+ + "\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0003\u0001\u0003\u0001\u0003"+ + "\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0004\u0001\u0004"+ + "\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004"+ + "\u0001\u0004\u0001\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005"+ + "\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0006\u0001\u0006\u0001\u0006"+ + "\u0001\u0006\u0001\u0006\u0001\u0007\u0001\u0007\u0001\b\u0001\b\u0001"+ + "\t\u0001\t\u0001\t\u0001\t\u0005\tT\b\t\n\t\f\tW\t\t\u0001\t\u0001\t\u0001"+ + "\t\u0001\t\u0001\t\u0005\t^\b\t\n\t\f\ta\t\t\u0001\t\u0001\t\u0003\te"+ + "\b\t\u0001\n\u0001\n\u0001\n\u0004\nj\b\n\u000b\n\f\nk\u0001\u000b\u0001"+ + "\u000b\u0001\u000b\u0001\u000b\u0005\u000br\b\u000b\n\u000b\f\u000bu\t"+ + "\u000b\u0001\u000b\u0001\u000b\u0001\f\u0001\f\u0001\f\u0001\f\u0005\f"+ + "}\b\f\n\f\f\f\u0080\t\f\u0001\f\u0003\f\u0083\b\f\u0001\f\u0003\f\u0086"+ + "\b\f\u0001\f\u0001\f\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001"+ + "\r\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0005\u000e"+ + "\u0096\b\u000e\n\u000e\f\u000e\u0099\t\u000e\u0001\u000e\u0001\u000e\u0001"+ + "\u000e\u0001\u000e\u0001\u000e\u0001\u000f\u0004\u000f\u00a1\b\u000f\u000b"+ + "\u000f\f\u000f\u00a2\u0001\u000f\u0001\u000f\u0001\u0097\u0000\u0010\u0001"+ + "\u0001\u0003\u0002\u0005\u0003\u0007\u0004\t\u0005\u000b\u0006\r\u0007"+ + "\u000f\u0000\u0011\u0000\u0013\b\u0015\t\u0017\n\u0019\u000b\u001b\f\u001d"+ + "\r\u001f\u000e\u0001\u0000\u0015\u0002\u0000SSss\u0002\u0000HHhh\u0002"+ + "\u0000OOoo\u0002\u0000WWww\u0002\u0000PPpp\u0002\u0000AAaa\u0002\u0000"+ + "TTtt\u0002\u0000EEee\u0002\u0000LLll\u0002\u0000CCcc\u0002\u0000FFff\u0002"+ + "\u0000RRrr\u0002\u0000MMmm\u0001\u000009\u0002\u0000AZaz\u0002\u0000\'"+ + "\'\\\\\u0002\u0000\"\"\\\\\u0001\u0000``\u0002\u0000\n\n\r\r\u0001\u0000"+ + "++\u0003\u0000\t\n\r\r \u00b3\u0000\u0001\u0001\u0000\u0000\u0000\u0000"+ + "\u0003\u0001\u0000\u0000\u0000\u0000\u0005\u0001\u0000\u0000\u0000\u0000"+ + "\u0007\u0001\u0000\u0000\u0000\u0000\t\u0001\u0000\u0000\u0000\u0000\u000b"+ + "\u0001\u0000\u0000\u0000\u0000\r\u0001\u0000\u0000\u0000\u0000\u0013\u0001"+ + "\u0000\u0000\u0000\u0000\u0015\u0001\u0000\u0000\u0000\u0000\u0017\u0001"+ + "\u0000\u0000\u0000\u0000\u0019\u0001\u0000\u0000\u0000\u0000\u001b\u0001"+ + "\u0000\u0000\u0000\u0000\u001d\u0001\u0000\u0000\u0000\u0000\u001f\u0001"+ + "\u0000\u0000\u0000\u0001!\u0001\u0000\u0000\u0000\u0003#\u0001\u0000\u0000"+ + "\u0000\u0005(\u0001\u0000\u0000\u0000\u0007.\u0001\u0000\u0000\u0000\t"+ + "5\u0001\u0000\u0000\u0000\u000b?\u0001\u0000\u0000\u0000\rF\u0001\u0000"+ + "\u0000\u0000\u000fK\u0001\u0000\u0000\u0000\u0011M\u0001\u0000\u0000\u0000"+ + "\u0013d\u0001\u0000\u0000\u0000\u0015i\u0001\u0000\u0000\u0000\u0017m"+ + "\u0001\u0000\u0000\u0000\u0019x\u0001\u0000\u0000\u0000\u001b\u0089\u0001"+ + "\u0000\u0000\u0000\u001d\u0090\u0001\u0000\u0000\u0000\u001f\u00a0\u0001"+ + "\u0000\u0000\u0000!\"\u0005.\u0000\u0000\"\u0002\u0001\u0000\u0000\u0000"+ + "#$\u0007\u0000\u0000\u0000$%\u0007\u0001\u0000\u0000%&\u0007\u0002\u0000"+ + "\u0000&\'\u0007\u0003\u0000\u0000\'\u0004\u0001\u0000\u0000\u0000()\u0007"+ + "\u0004\u0000\u0000)*\u0007\u0005\u0000\u0000*+\u0007\u0006\u0000\u0000"+ + "+,\u0007\u0001\u0000\u0000,-\u0007\u0000\u0000\u0000-\u0006\u0001\u0000"+ + "\u0000\u0000./\u0005T\u0000\u0000/0\u0005O\u0000\u000001\u0005P\u0000"+ + "\u000012\u0005I\u0000\u000023\u0005C\u0000\u000034\u0005S\u0000\u0000"+ + "4\b\u0001\u0000\u0000\u000056\u0005C\u0000\u000067\u0005O\u0000\u0000"+ + "78\u0005N\u0000\u000089\u0005S\u0000\u00009:\u0005U\u0000\u0000:;\u0005"+ + "M\u0000\u0000;<\u0005E\u0000\u0000<=\u0005R\u0000\u0000=>\u0005S\u0000"+ + "\u0000>\n\u0001\u0000\u0000\u0000?@\u0007\u0000\u0000\u0000@A\u0007\u0007"+ + "\u0000\u0000AB\u0007\b\u0000\u0000BC\u0007\u0007\u0000\u0000CD\u0007\t"+ + "\u0000\u0000DE\u0007\u0006\u0000\u0000E\f\u0001\u0000\u0000\u0000FG\u0007"+ + "\n\u0000\u0000GH\u0007\u000b\u0000\u0000HI\u0007\u0002\u0000\u0000IJ\u0007"+ + "\f\u0000\u0000J\u000e\u0001\u0000\u0000\u0000KL\u0007\r\u0000\u0000L\u0010"+ + "\u0001\u0000\u0000\u0000MN\u0007\u000e\u0000\u0000N\u0012\u0001\u0000"+ + "\u0000\u0000OU\u0005\'\u0000\u0000PT\b\u000f\u0000\u0000QR\u0005\\\u0000"+ + "\u0000RT\t\u0000\u0000\u0000SP\u0001\u0000\u0000\u0000SQ\u0001\u0000\u0000"+ + "\u0000TW\u0001\u0000\u0000\u0000US\u0001\u0000\u0000\u0000UV\u0001\u0000"+ + "\u0000\u0000VX\u0001\u0000\u0000\u0000WU\u0001\u0000\u0000\u0000Xe\u0005"+ + "\'\u0000\u0000Y_\u0005\"\u0000\u0000Z^\b\u0010\u0000\u0000[\\\u0005\\"+ + "\u0000\u0000\\^\t\u0000\u0000\u0000]Z\u0001\u0000\u0000\u0000][\u0001"+ + "\u0000\u0000\u0000^a\u0001\u0000\u0000\u0000_]\u0001\u0000\u0000\u0000"+ + "_`\u0001\u0000\u0000\u0000`b\u0001\u0000\u0000\u0000a_\u0001\u0000\u0000"+ + "\u0000be\u0005\"\u0000\u0000ce\u0005*\u0000\u0000dO\u0001\u0000\u0000"+ + "\u0000dY\u0001\u0000\u0000\u0000dc\u0001\u0000\u0000\u0000e\u0014\u0001"+ + "\u0000\u0000\u0000fj\u0003\u0011\b\u0000gj\u0003\u000f\u0007\u0000hj\u0005"+ + "_\u0000\u0000if\u0001\u0000\u0000\u0000ig\u0001\u0000\u0000\u0000ih\u0001"+ + "\u0000\u0000\u0000jk\u0001\u0000\u0000\u0000ki\u0001\u0000\u0000\u0000"+ + "kl\u0001\u0000\u0000\u0000l\u0016\u0001\u0000\u0000\u0000ms\u0005`\u0000"+ + "\u0000nr\b\u0011\u0000\u0000op\u0005`\u0000\u0000pr\u0005`\u0000\u0000"+ + "qn\u0001\u0000\u0000\u0000qo\u0001\u0000\u0000\u0000ru\u0001\u0000\u0000"+ + "\u0000sq\u0001\u0000\u0000\u0000st\u0001\u0000\u0000\u0000tv\u0001\u0000"+ + "\u0000\u0000us\u0001\u0000\u0000\u0000vw\u0005`\u0000\u0000w\u0018\u0001"+ + "\u0000\u0000\u0000xy\u0005-\u0000\u0000yz\u0005-\u0000\u0000z~\u0001\u0000"+ + "\u0000\u0000{}\b\u0012\u0000\u0000|{\u0001\u0000\u0000\u0000}\u0080\u0001"+ + "\u0000\u0000\u0000~|\u0001\u0000\u0000\u0000~\u007f\u0001\u0000\u0000"+ + "\u0000\u007f\u0082\u0001\u0000\u0000\u0000\u0080~\u0001\u0000\u0000\u0000"+ + "\u0081\u0083\u0005\r\u0000\u0000\u0082\u0081\u0001\u0000\u0000\u0000\u0082"+ + "\u0083\u0001\u0000\u0000\u0000\u0083\u0085\u0001\u0000\u0000\u0000\u0084"+ + "\u0086\u0005\n\u0000\u0000\u0085\u0084\u0001\u0000\u0000\u0000\u0085\u0086"+ + "\u0001\u0000\u0000\u0000\u0086\u0087\u0001\u0000\u0000\u0000\u0087\u0088"+ + "\u0006\f\u0000\u0000\u0088\u001a\u0001\u0000\u0000\u0000\u0089\u008a\u0005"+ + "/\u0000\u0000\u008a\u008b\u0005*\u0000\u0000\u008b\u008c\u0005*\u0000"+ + "\u0000\u008c\u008d\u0005/\u0000\u0000\u008d\u008e\u0001\u0000\u0000\u0000"+ + "\u008e\u008f\u0006\r\u0000\u0000\u008f\u001c\u0001\u0000\u0000\u0000\u0090"+ + "\u0091\u0005/\u0000\u0000\u0091\u0092\u0005*\u0000\u0000\u0092\u0093\u0001"+ + "\u0000\u0000\u0000\u0093\u0097\b\u0013\u0000\u0000\u0094\u0096\t\u0000"+ + "\u0000\u0000\u0095\u0094\u0001\u0000\u0000\u0000\u0096\u0099\u0001\u0000"+ + "\u0000\u0000\u0097\u0098\u0001\u0000\u0000\u0000\u0097\u0095\u0001\u0000"+ + "\u0000\u0000\u0098\u009a\u0001\u0000\u0000\u0000\u0099\u0097\u0001\u0000"+ + "\u0000\u0000\u009a\u009b\u0005*\u0000\u0000\u009b\u009c\u0005/\u0000\u0000"+ + "\u009c\u009d\u0001\u0000\u0000\u0000\u009d\u009e\u0006\u000e\u0000\u0000"+ + "\u009e\u001e\u0001\u0000\u0000\u0000\u009f\u00a1\u0007\u0014\u0000\u0000"+ + "\u00a0\u009f\u0001\u0000\u0000\u0000\u00a1\u00a2\u0001\u0000\u0000\u0000"+ + "\u00a2\u00a0\u0001\u0000\u0000\u0000\u00a2\u00a3\u0001\u0000\u0000\u0000"+ + "\u00a3\u00a4\u0001\u0000\u0000\u0000\u00a4\u00a5\u0006\u000f\u0000\u0000"+ + "\u00a5 \u0001\u0000\u0000\u0000\u000f\u0000SU]_dikqs~\u0082\u0085\u0097"+ + "\u00a2\u0001\u0000\u0001\u0000"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseListener.java b/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseListener.java index 24124016..ec47bb84 100644 --- a/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseListener.java +++ b/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseListener.java @@ -1,4 +1,4 @@ -// Generated from io/edurt/datacap/sql/parser/SqlBase.g4 by ANTLR 4.9.3 +// Generated from io/edurt/datacap/sql/parser/SqlBase.g4 by ANTLR 4.12.0 package io.edurt.datacap.sql.parser; import org.antlr.v4.runtime.tree.ParseTreeListener; diff --git a/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseParser.java b/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseParser.java index 1caf2970..1a88c8ad 100644 --- a/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseParser.java +++ b/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseParser.java @@ -1,4 +1,4 @@ -// Generated from io/edurt/datacap/sql/parser/SqlBase.g4 by ANTLR 4.9.3 +// Generated from io/edurt/datacap/sql/parser/SqlBase.g4 by ANTLR 4.12.0 package io.edurt.datacap.sql.parser; import org.antlr.v4.runtime.atn.*; import org.antlr.v4.runtime.dfa.DFA; @@ -9,9 +9,9 @@ import java.util.List; import java.util.Iterator; import java.util.ArrayList; -@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue"}) public class SqlBaseParser extends Parser { - static { RuntimeMetaData.checkVersion("4.9.3", RuntimeMetaData.VERSION); } + static { RuntimeMetaData.checkVersion("4.12.0", RuntimeMetaData.VERSION); } protected static final DFA[] _decisionToDFA; protected static final PredictionContextCache _sharedContextCache = @@ -99,6 +99,7 @@ public class SqlBaseParser extends Parser { _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); } + @SuppressWarnings("CheckReturnValue") public static class SingleStatementContext extends ParserRuleContext { public List statement() { return getRuleContexts(StatementContext.class); @@ -159,6 +160,7 @@ public class SqlBaseParser extends Parser { return _localctx; } + @SuppressWarnings("CheckReturnValue") public static class StatementContext extends ParserRuleContext { public TerminalNode SHOW() { return getToken(SqlBaseParser.SHOW, 0); } public ChildPathStatementContext childPathStatement() { @@ -240,6 +242,7 @@ public class SqlBaseParser extends Parser { return _localctx; } + @SuppressWarnings("CheckReturnValue") public static class KafkaQueryTopicStatementContext extends ParserRuleContext { public TerminalNode SHOW() { return getToken(SqlBaseParser.SHOW, 0); } public TerminalNode TOPICS() { return getToken(SqlBaseParser.TOPICS, 0); } @@ -285,6 +288,7 @@ public class SqlBaseParser extends Parser { return _localctx; } + @SuppressWarnings("CheckReturnValue") public static class KafkaQueryConsumerStatementContext extends ParserRuleContext { public TerminalNode SHOW() { return getToken(SqlBaseParser.SHOW, 0); } public TerminalNode CONSUMERS() { return getToken(SqlBaseParser.CONSUMERS, 0); } @@ -350,6 +354,7 @@ public class SqlBaseParser extends Parser { return _localctx; } + @SuppressWarnings("CheckReturnValue") public static class KafkaQueryStatementContext extends ParserRuleContext { public KafkaQueryTopicStatementContext kafkaQueryTopicStatement() { return getRuleContext(KafkaQueryTopicStatementContext.class,0); @@ -410,6 +415,7 @@ public class SqlBaseParser extends Parser { return _localctx; } + @SuppressWarnings("CheckReturnValue") public static class KafkaStatementContext extends ParserRuleContext { public KafkaQueryStatementContext kafkaQueryStatement() { return getRuleContext(KafkaQueryStatementContext.class,0); @@ -454,6 +460,7 @@ public class SqlBaseParser extends Parser { return _localctx; } + @SuppressWarnings("CheckReturnValue") public static class ChildPathStatementContext extends ParserRuleContext { public TerminalNode PATHS() { return getToken(SqlBaseParser.PATHS, 0); } public FromClauseContext fromClause() { @@ -514,6 +521,7 @@ public class SqlBaseParser extends Parser { return _localctx; } + @SuppressWarnings("CheckReturnValue") public static class ColumnStatementContext extends ParserRuleContext { public IdentifierContext identifier() { return getRuleContext(IdentifierContext.class,0); @@ -558,6 +566,7 @@ public class SqlBaseParser extends Parser { return _localctx; } + @SuppressWarnings("CheckReturnValue") public static class FromClauseContext extends ParserRuleContext { public TerminalNode FROM() { return getToken(SqlBaseParser.FROM, 0); } public TableNameContext tableName() { @@ -605,6 +614,7 @@ public class SqlBaseParser extends Parser { return _localctx; } + @SuppressWarnings("CheckReturnValue") public static class TableNameContext extends ParserRuleContext { public List identifier() { return getRuleContexts(IdentifierContext.class); @@ -669,6 +679,7 @@ public class SqlBaseParser extends Parser { return _localctx; } + @SuppressWarnings("CheckReturnValue") public static class IdentifierContext extends ParserRuleContext { public List IDENTIFIER() { return getTokens(SqlBaseParser.IDENTIFIER); } public TerminalNode IDENTIFIER(int i) { @@ -713,7 +724,7 @@ public class SqlBaseParser extends Parser { setState(78); _errHandler.sync(this); _la = _input.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << STRING) | (1L << IDENTIFIER) | (1L << BACKQUOTED_IDENTIFIER))) != 0)) { + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 1792L) != 0)) { { setState(76); _errHandler.sync(this); @@ -757,6 +768,7 @@ public class SqlBaseParser extends Parser { return _localctx; } + @SuppressWarnings("CheckReturnValue") public static class QuotedIdentifierContext extends ParserRuleContext { public TerminalNode BACKQUOTED_IDENTIFIER() { return getToken(SqlBaseParser.BACKQUOTED_IDENTIFIER, 0); } public QuotedIdentifierContext(ParserRuleContext parent, int invokingState) { @@ -800,27 +812,52 @@ public class SqlBaseParser extends Parser { } public static final String _serializedATN = - "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\20V\4\2\t\2\4\3\t"+ - "\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4"+ - "\f\t\f\4\r\t\r\3\2\7\2\34\n\2\f\2\16\2\37\13\2\3\3\3\3\3\3\3\3\3\3\3\3"+ - "\3\3\5\3(\n\3\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\5\5\62\n\5\3\6\3\6\5\6\66"+ - "\n\6\3\7\3\7\3\b\3\b\3\b\5\b=\n\b\3\t\3\t\3\n\3\n\3\n\3\13\3\13\3\13\7"+ - "\13G\n\13\f\13\16\13J\13\13\3\f\3\f\3\f\7\fO\n\f\f\f\16\fR\13\f\3\r\3"+ - "\r\3\r\2\2\16\2\4\6\b\n\f\16\20\22\24\26\30\2\2\2S\2\35\3\2\2\2\4\'\3"+ - "\2\2\2\6)\3\2\2\2\b\61\3\2\2\2\n\65\3\2\2\2\f\67\3\2\2\2\16<\3\2\2\2\20"+ - ">\3\2\2\2\22@\3\2\2\2\24C\3\2\2\2\26P\3\2\2\2\30S\3\2\2\2\32\34\5\4\3"+ - "\2\33\32\3\2\2\2\34\37\3\2\2\2\35\33\3\2\2\2\35\36\3\2\2\2\36\3\3\2\2"+ - "\2\37\35\3\2\2\2 !\7\4\2\2!(\5\16\b\2\"#\7\b\2\2#$\5\20\t\2$%\5\22\n\2"+ - "%(\3\2\2\2&(\5\f\7\2\' \3\2\2\2\'\"\3\2\2\2\'&\3\2\2\2(\5\3\2\2\2)*\7"+ - "\4\2\2*+\7\6\2\2+\7\3\2\2\2,-\7\4\2\2-\62\7\7\2\2./\7\4\2\2/\60\7\7\2"+ - "\2\60\62\5\22\n\2\61,\3\2\2\2\61.\3\2\2\2\62\t\3\2\2\2\63\66\5\6\4\2\64"+ - "\66\5\b\5\2\65\63\3\2\2\2\65\64\3\2\2\2\66\13\3\2\2\2\678\5\n\6\28\r\3"+ - "\2\2\29=\7\5\2\2:;\7\5\2\2;=\5\22\n\2<9\3\2\2\2<:\3\2\2\2=\17\3\2\2\2"+ - ">?\5\26\f\2?\21\3\2\2\2@A\7\t\2\2AB\5\24\13\2B\23\3\2\2\2CH\5\26\f\2D"+ - "E\7\3\2\2EG\5\26\f\2FD\3\2\2\2GJ\3\2\2\2HF\3\2\2\2HI\3\2\2\2I\25\3\2\2"+ - "\2JH\3\2\2\2KO\7\13\2\2LO\7\n\2\2MO\5\30\r\2NK\3\2\2\2NL\3\2\2\2NM\3\2"+ - "\2\2OR\3\2\2\2PN\3\2\2\2PQ\3\2\2\2Q\27\3\2\2\2RP\3\2\2\2ST\7\f\2\2T\31"+ - "\3\2\2\2\n\35\'\61\65\u0001\u0000\u0000\u0000\u0012A\u0001\u0000\u0000\u0000\u0014"+ + "N\u0001\u0000\u0000\u0000\u0016Q\u0001\u0000\u0000\u0000\u0018\u001a\u0003"+ + "\u0002\u0001\u0000\u0019\u0018\u0001\u0000\u0000\u0000\u001a\u001d\u0001"+ + "\u0000\u0000\u0000\u001b\u0019\u0001\u0000\u0000\u0000\u001b\u001c\u0001"+ + "\u0000\u0000\u0000\u001c\u0001\u0001\u0000\u0000\u0000\u001d\u001b\u0001"+ + "\u0000\u0000\u0000\u001e\u001f\u0005\u0002\u0000\u0000\u001f&\u0003\f"+ + "\u0006\u0000 !\u0005\u0006\u0000\u0000!\"\u0003\u000e\u0007\u0000\"#\u0003"+ + "\u0010\b\u0000#&\u0001\u0000\u0000\u0000$&\u0003\n\u0005\u0000%\u001e"+ + "\u0001\u0000\u0000\u0000% \u0001\u0000\u0000\u0000%$\u0001\u0000\u0000"+ + "\u0000&\u0003\u0001\u0000\u0000\u0000\'(\u0005\u0002\u0000\u0000()\u0005"+ + "\u0004\u0000\u0000)\u0005\u0001\u0000\u0000\u0000*+\u0005\u0002\u0000"+ + "\u0000+0\u0005\u0005\u0000\u0000,-\u0005\u0002\u0000\u0000-.\u0005\u0005"+ + "\u0000\u0000.0\u0003\u0010\b\u0000/*\u0001\u0000\u0000\u0000/,\u0001\u0000"+ + "\u0000\u00000\u0007\u0001\u0000\u0000\u000014\u0003\u0004\u0002\u0000"+ + "24\u0003\u0006\u0003\u000031\u0001\u0000\u0000\u000032\u0001\u0000\u0000"+ + "\u00004\t\u0001\u0000\u0000\u000056\u0003\b\u0004\u00006\u000b\u0001\u0000"+ + "\u0000\u00007;\u0005\u0003\u0000\u000089\u0005\u0003\u0000\u00009;\u0003"+ + "\u0010\b\u0000:7\u0001\u0000\u0000\u0000:8\u0001\u0000\u0000\u0000;\r"+ + "\u0001\u0000\u0000\u0000<=\u0003\u0014\n\u0000=\u000f\u0001\u0000\u0000"+ + "\u0000>?\u0005\u0007\u0000\u0000?@\u0003\u0012\t\u0000@\u0011\u0001\u0000"+ + "\u0000\u0000AF\u0003\u0014\n\u0000BC\u0005\u0001\u0000\u0000CE\u0003\u0014"+ + "\n\u0000DB\u0001\u0000\u0000\u0000EH\u0001\u0000\u0000\u0000FD\u0001\u0000"+ + "\u0000\u0000FG\u0001\u0000\u0000\u0000G\u0013\u0001\u0000\u0000\u0000"+ + "HF\u0001\u0000\u0000\u0000IM\u0005\t\u0000\u0000JM\u0005\b\u0000\u0000"+ + "KM\u0003\u0016\u000b\u0000LI\u0001\u0000\u0000\u0000LJ\u0001\u0000\u0000"+ + "\u0000LK\u0001\u0000\u0000\u0000MP\u0001\u0000\u0000\u0000NL\u0001\u0000"+ + "\u0000\u0000NO\u0001\u0000\u0000\u0000O\u0015\u0001\u0000\u0000\u0000"+ + "PN\u0001\u0000\u0000\u0000QR\u0005\n\u0000\u0000R\u0017\u0001\u0000\u0000"+ + "\u0000\b\u001b%/3:FLN"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseVisitor.java b/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseVisitor.java index 20d14c30..af88b64f 100644 --- a/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseVisitor.java +++ b/core/datacap-parser/src/main/java/io/edurt/datacap/sql/parser/SqlBaseVisitor.java @@ -1,4 +1,4 @@ -// Generated from io/edurt/datacap/sql/parser/SqlBase.g4 by ANTLR 4.9.3 +// Generated from io/edurt/datacap/sql/parser/SqlBase.g4 by ANTLR 4.12.0 package io.edurt.datacap.sql.parser; import org.antlr.v4.runtime.tree.ParseTreeVisitor;