This is an automated email from the ASF dual-hosted git repository.

duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 0ac9356bf17 Move sql translator jooq to ShardingSphere plugin 
repository (#30291)
0ac9356bf17 is described below

commit 0ac9356bf17c2fbde2cb90ded296d566765d4378
Author: Zhengqiang Duan <[email protected]>
AuthorDate: Mon Feb 26 14:03:39 2024 +0800

    Move sql translator jooq to ShardingSphere plugin repository (#30291)
---
 .../builtin-algorithm/sql-translator.cn.md         | 18 -------
 .../builtin-algorithm/sql-translator.en.md         | 18 -------
 .../java-api/rules/sql-translator.cn.md            |  2 +-
 .../java-api/rules/sql-translator.en.md            |  2 +-
 .../optional-plugins/_index.cn.md                  |  2 -
 .../optional-plugins/_index.en.md                  |  2 -
 .../yaml-config/rules/sql-translator.cn.md         |  2 +-
 .../yaml-config/rules/sql-translator.en.md         |  2 +-
 .../optional-plugins/_index.cn.md                  |  2 -
 .../optional-plugins/_index.en.md                  |  2 -
 .../startup/graalvm-native-image.cn.md             |  5 --
 .../startup/graalvm-native-image.en.md             |  5 --
 .../update/AlterSQLTranslatorRuleExecutorTest.java |  4 +-
 .../main/antlr4/imports/sqltranslator/BaseRule.g4  |  2 +-
 .../main/antlr4/imports/sqltranslator/Keyword.g4   |  4 --
 kernel/sql-translator/provider/jooq/pom.xml        | 47 -----------------
 .../sqltranslator/jooq/JooQDialectRegistry.java    | 59 ----------------------
 .../sqltranslator/jooq/JooQSQLTranslator.java      | 54 --------------------
 ....shardingsphere.sqltranslator.spi.SQLTranslator | 18 -------
 kernel/sql-translator/provider/pom.xml             |  1 -
 pom.xml                                            |  2 -
 21 files changed, 7 insertions(+), 246 deletions(-)

diff --git 
a/docs/document/content/user-manual/common-config/builtin-algorithm/sql-translator.cn.md
 
b/docs/document/content/user-manual/common-config/builtin-algorithm/sql-translator.cn.md
index c5db5f67736..d4965b52637 100644
--- 
a/docs/document/content/user-manual/common-config/builtin-algorithm/sql-translator.cn.md
+++ 
b/docs/document/content/user-manual/common-config/builtin-algorithm/sql-translator.cn.md
@@ -12,21 +12,3 @@ weight = 7
 无
 
 **默认使用的 SQL 翻译器,但目前暂未实现**
-
-## 使用 JooQ 的 SQL 翻译器
-
-类型:JOOQ
-
-可配置属性:
-
-无
-
-**由于需要第三方的 JooQ 依赖,因此 ShardingSphere 默认并未包含相关模块,需要使用下面的 Maven 坐标引用该模块**
-
-```xml
-<dependency>
-    <groupId>org.apache.shardingsphere</groupId>
-    <artifactId>shardingsphere-sql-translator-jooq-provider</artifactId>
-    <version>${project.version}</version>
-</dependency>
-```
diff --git 
a/docs/document/content/user-manual/common-config/builtin-algorithm/sql-translator.en.md
 
b/docs/document/content/user-manual/common-config/builtin-algorithm/sql-translator.en.md
index cac382fc70f..8758dabec01 100644
--- 
a/docs/document/content/user-manual/common-config/builtin-algorithm/sql-translator.en.md
+++ 
b/docs/document/content/user-manual/common-config/builtin-algorithm/sql-translator.en.md
@@ -12,21 +12,3 @@ Attributes:
 None
 
 **Default SQL translator, does not implement yet.**
-
-## JooQ SQL translator
-
-Type: JOOQ
-
-Attributes:
-
-None
-
-**Because of it need JooQ dependency, ShardingSphere does not include the 
module, please use below XML to import it by Maven.**
-
-```xml
-<dependency>
-    <groupId>org.apache.shardingsphere</groupId>
-    <artifactId>shardingsphere-sql-translator-jooq-provider</artifactId>
-    <version>${project.version}</version>
-</dependency>
-```
diff --git 
a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-translator.cn.md
 
b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-translator.cn.md
index eb9d3b182dd..6548b1ce901 100644
--- 
a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-translator.cn.md
+++ 
b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-translator.cn.md
@@ -26,7 +26,7 @@ weight = 9
 ## 配置示例
 
 ```java
-SQLTranslatorRuleConfiguration ruleConfig = new 
SQLTranslatorRuleConfiguration("Jooq", new Properties(), false);
+SQLTranslatorRuleConfiguration ruleConfig = new 
SQLTranslatorRuleConfiguration("Native", new Properties(), false);
 String translatedSQL = new SQLTranslatorRule(ruleConfig).translate();
 ```
 
diff --git 
a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-translator.en.md
 
b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-translator.en.md
index b78f1a0c2e3..0bc438b94f0 100644
--- 
a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-translator.en.md
+++ 
b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-translator.en.md
@@ -26,7 +26,7 @@ Attributes:
 ## Sample
 
 ```java
-SQLTranslatorRuleConfiguration ruleConfig = new 
SQLTranslatorRuleConfiguration("Jooq", new Properties(), false);
+SQLTranslatorRuleConfiguration ruleConfig = new 
SQLTranslatorRuleConfiguration("Native", new Properties(), false);
 String translatedSQL = new SQLTranslatorRule(ruleConfig).translate();
 ```
 
diff --git 
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/_index.cn.md
 
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/_index.cn.md
index e75561542eb..6e1723ef51b 100644
--- 
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/_index.cn.md
+++ 
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/_index.cn.md
@@ -47,8 +47,6 @@ ShardingSphere 默认情况下仅包含核心 SPI 的实现,在 Git Source 存
   - `org.apache.shardingsphere:shardingsphere-cluster-mode-repository-etcd`,基于 
Etcd 的持久化实现
 - XA 分布式事务管理器
   - `org.apache.shardingsphere:shardingsphere-transaction-xa-narayana`,基于 
Narayana 的 XA 分布式事务管理器
-- SQL 翻译
-  - `org.apache.shardingsphere:shardingsphere-sql-translator-jooq-provider`,使用 
JooQ 的 SQL 翻译器
 - 行表达式
   - `org.apache.shardingsphere:shardingsphere-infra-expr-espresso`,基于 GraalVM 
Truffle 的 Espresso 实现的使用 Groovy 语法的行表达式
 - 数据库类型识别
diff --git 
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/_index.en.md
 
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/_index.en.md
index 77d3b98fd40..ad3594e96f5 100644
--- 
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/_index.en.md
+++ 
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/_index.en.md
@@ -47,8 +47,6 @@ All optional plugins are listed below in the form of 
`groupId:artifactId`.
   - `org.apache.shardingsphere:shardingsphere-cluster-mode-repository-etcd`, 
Etcd based persistence
 - XA transaction manager provider definition
   - `org.apache.shardingsphere:shardingsphere-transaction-xa-narayana`, XA 
distributed transaction manager based on Narayana
-- SQL translator
-  - `org.apache.shardingsphere:shardingsphere-sql-translator-jooq-provider`, 
JooQ SQL translator
 - Row Value Expressions definition
   - `org.apache.shardingsphere:shardingsphere-infra-expr-espresso`,Row Value 
Expressions that uses the Groovy syntax based on GraalVM Truffle's Espresso 
implementation
 - Database type identification
diff --git 
a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-translator.cn.md
 
b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-translator.cn.md
index 3193f9863ee..d9067396562 100644
--- 
a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-translator.cn.md
+++ 
b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-translator.cn.md
@@ -24,7 +24,7 @@ sqlTranslator:
 
 ```yaml
 sqlTranslator:
-  type: Jooq
+  type: Native
   useOriginalSQLWhenTranslatingFailed: true
 ```
 
diff --git 
a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-translator.en.md
 
b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-translator.en.md
index 0e1abd9d2bc..8680d0c35c2 100644
--- 
a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-translator.en.md
+++ 
b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-translator.en.md
@@ -23,7 +23,7 @@ sqlTranslator:
 
 ```yaml
 sqlTranslator:
-  type: Jooq
+  type: Native
   useOriginalSQLWhenTranslatingFailed: true
 ```
 
diff --git 
a/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/_index.cn.md
 
b/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/_index.cn.md
index cc20769825b..c67e45edc16 100644
--- 
a/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/_index.cn.md
+++ 
b/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/_index.cn.md
@@ -34,8 +34,6 @@ ShardingSphere 默认情况下仅包含核心 SPI 的实现,在 Git Source 存
   - 
`org.apache.shardingsphere:shardingsphere-standalone-mode-repository-jdbc`,基于 
JDBC 的持久化
 - XA 分布式事务管理器
   - `org.apache.shardingsphere:shardingsphere-transaction-xa-narayana`,基于 
Narayana 的 XA 分布式事务管理器
-- SQL 翻译
-  - `org.apache.shardingsphere:shardingsphere-sql-translator-jooq-provider`,使用 
JooQ 的 SQL 翻译器
 - 行表达式
   - `org.apache.shardingsphere:shardingsphere-infra-expr-espresso`,基于 GraalVM 
Truffle 的 Espresso 实现的使用 Groovy 语法的行表达式
 - 数据库类型识别
diff --git 
a/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/_index.en.md
 
b/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/_index.en.md
index 992cdf05eb8..2344a457729 100644
--- 
a/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/_index.en.md
+++ 
b/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/_index.en.md
@@ -34,8 +34,6 @@ All optional plugins are listed below in the form of 
`groupId:artifactId`.
   - 
`org.apache.shardingsphere:shardingsphere-standalone-mode-repository-jdbc`, 
JDBC based persistence
 - XA transaction manager provider definition
   - `org.apache.shardingsphere:shardingsphere-transaction-xa-narayana`, XA 
distributed transaction manager based on Narayana
-- SQL translator
-  - `org.apache.shardingsphere:shardingsphere-sql-translator-jooq-provider`, 
JooQ SQL translator
 - Row Value Expressions definition
   - `org.apache.shardingsphere:shardingsphere-infra-expr-espresso`,Row Value 
Expressions that uses the Groovy syntax based on GraalVM Truffle's Espresso 
implementation
 - Database type identification
diff --git 
a/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.cn.md
 
b/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.cn.md
index ba92f51e466..faf22495aeb 100644
--- 
a/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.cn.md
+++ 
b/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.cn.md
@@ -71,11 +71,6 @@ sdk install java 21.0.2-graalce
     <artifactId>mysql-connector-j</artifactId>
     <version>8.1.0</version>
   </dependency>
-  <dependency>
-    <groupId>org.apache.shardingsphere</groupId>
-    <artifactId>shardingsphere-sql-translator-jooq-provider</artifactId>
-    <version>5.4.0</version>
-  </dependency>
 </dependencies>
 ```
 
diff --git 
a/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.en.md
 
b/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.en.md
index 9311ef87c90..9e07d305e55 100644
--- 
a/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.en.md
+++ 
b/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.en.md
@@ -76,11 +76,6 @@ sdk install java 21.0.2-graalce
         <artifactId>mysql-connector-j</artifactId>
         <version>8.1.0</version>
     </dependency>
-    <dependency>
-        <groupId>org.apache.shardingsphere</groupId>
-        <artifactId>shardingsphere-sql-translator-jooq-provider</artifactId>
-        <version>5.4.0</version>
-    </dependency>
 </dependencies>
 ```
 
diff --git 
a/kernel/sql-translator/distsql/handler/src/test/java/org/apache/shardingsphere/sqltranslator/distsql/handler/update/AlterSQLTranslatorRuleExecutorTest.java
 
b/kernel/sql-translator/distsql/handler/src/test/java/org/apache/shardingsphere/sqltranslator/distsql/handler/update/AlterSQLTranslatorRuleExecutorTest.java
index ccef78b7c1f..3adef17ca7d 100644
--- 
a/kernel/sql-translator/distsql/handler/src/test/java/org/apache/shardingsphere/sqltranslator/distsql/handler/update/AlterSQLTranslatorRuleExecutorTest.java
+++ 
b/kernel/sql-translator/distsql/handler/src/test/java/org/apache/shardingsphere/sqltranslator/distsql/handler/update/AlterSQLTranslatorRuleExecutorTest.java
@@ -42,8 +42,8 @@ class AlterSQLTranslatorRuleExecutorTest {
         
when(rule.getConfiguration()).thenReturn(createSQLTranslatorRuleConfiguration());
         executor.setRule(rule);
         SQLTranslatorRuleConfiguration actual = 
executor.buildToBeAlteredRuleConfiguration(
-                new AlterSQLTranslatorRuleStatement(new 
AlgorithmSegment("JOOQ", PropertiesBuilder.build(new Property("foo", "bar"))), 
null));
-        assertThat(actual.getType(), is("JOOQ"));
+                new AlterSQLTranslatorRuleStatement(new 
AlgorithmSegment("Native", PropertiesBuilder.build(new Property("foo", 
"bar"))), null));
+        assertThat(actual.getType(), is("Native"));
         assertThat(actual.getProps().size(), is(1));
         assertThat(actual.getProps().getProperty("foo"), is("bar"));
         assertTrue(actual.isUseOriginalSQLWhenTranslatingFailed());
diff --git 
a/kernel/sql-translator/distsql/parser/src/main/antlr4/imports/sqltranslator/BaseRule.g4
 
b/kernel/sql-translator/distsql/parser/src/main/antlr4/imports/sqltranslator/BaseRule.g4
index 0eef60a72b9..6021ec7688f 100644
--- 
a/kernel/sql-translator/distsql/parser/src/main/antlr4/imports/sqltranslator/BaseRule.g4
+++ 
b/kernel/sql-translator/distsql/parser/src/main/antlr4/imports/sqltranslator/BaseRule.g4
@@ -28,7 +28,7 @@ algorithmTypeName
     ;
 
 buildInProviderTypeName
-    : JOOQ | NATIVE
+    : NATIVE
     ;
 
 propertiesDefinition
diff --git 
a/kernel/sql-translator/distsql/parser/src/main/antlr4/imports/sqltranslator/Keyword.g4
 
b/kernel/sql-translator/distsql/parser/src/main/antlr4/imports/sqltranslator/Keyword.g4
index 8b1e92bf129..a1e8095f1b4 100644
--- 
a/kernel/sql-translator/distsql/parser/src/main/antlr4/imports/sqltranslator/Keyword.g4
+++ 
b/kernel/sql-translator/distsql/parser/src/main/antlr4/imports/sqltranslator/Keyword.g4
@@ -47,10 +47,6 @@ TYPE
     : T Y P E
     ;
 
-JOOQ
-    : J O O Q
-    ;
-
 NATIVE
     : N A T I V E
     ;
diff --git a/kernel/sql-translator/provider/jooq/pom.xml 
b/kernel/sql-translator/provider/jooq/pom.xml
deleted file mode 100644
index d440046f47b..00000000000
--- a/kernel/sql-translator/provider/jooq/pom.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~     http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.apache.shardingsphere</groupId>
-        <artifactId>shardingsphere-sql-translator-provider</artifactId>
-        <version>5.4.2-SNAPSHOT</version>
-    </parent>
-    <artifactId>shardingsphere-sql-translator-jooq-provider</artifactId>
-    <name>${project.artifactId}</name>
-    
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>shardingsphere-sql-translator-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.jooq</groupId>
-            <artifactId>jooq</artifactId>
-            <version>${jooq.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>shardingsphere-sql-translator-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-</project>
diff --git 
a/kernel/sql-translator/provider/jooq/src/main/java/org/apache/shardingsphere/sqltranslator/jooq/JooQDialectRegistry.java
 
b/kernel/sql-translator/provider/jooq/src/main/java/org/apache/shardingsphere/sqltranslator/jooq/JooQDialectRegistry.java
deleted file mode 100644
index 36451afdc35..00000000000
--- 
a/kernel/sql-translator/provider/jooq/src/main/java/org/apache/shardingsphere/sqltranslator/jooq/JooQDialectRegistry.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.sqltranslator.jooq;
-
-import lombok.AccessLevel;
-import lombok.NoArgsConstructor;
-import org.apache.shardingsphere.infra.database.core.type.DatabaseType;
-import 
org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions;
-import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
-import 
org.apache.shardingsphere.sqltranslator.exception.syntax.UnsupportedTranslatedDatabaseException;
-import org.jooq.SQLDialect;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * JOOQ SQL dialect registry.
- */
-@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public final class JooQDialectRegistry {
-    
-    private static final Map<DatabaseType, SQLDialect> DATABASE_DIALECT_MAP = 
new HashMap<>();
-    
-    static {
-        DATABASE_DIALECT_MAP.put(TypedSPILoader.getService(DatabaseType.class, 
"PostgreSQL"), SQLDialect.POSTGRES);
-        DATABASE_DIALECT_MAP.put(TypedSPILoader.getService(DatabaseType.class, 
"MySQL"), SQLDialect.MYSQL);
-        DATABASE_DIALECT_MAP.put(TypedSPILoader.getService(DatabaseType.class, 
"MariaDB"), SQLDialect.MARIADB);
-        DATABASE_DIALECT_MAP.put(TypedSPILoader.getService(DatabaseType.class, 
"openGauss"), SQLDialect.POSTGRES);
-        DATABASE_DIALECT_MAP.put(TypedSPILoader.getService(DatabaseType.class, 
"H2"), SQLDialect.H2);
-        DATABASE_DIALECT_MAP.put(TypedSPILoader.getService(DatabaseType.class, 
"SQL92"), SQLDialect.DEFAULT);
-    }
-    
-    /**
-     * Get SQL dialect.
-     *
-     * @param databaseType database type
-     * @return SQL dialect
-     */
-    public static SQLDialect getSQLDialect(final DatabaseType databaseType) {
-        SQLDialect result = DATABASE_DIALECT_MAP.get(databaseType);
-        ShardingSpherePreconditions.checkState(null != result, () -> new 
UnsupportedTranslatedDatabaseException(databaseType));
-        return result;
-    }
-}
diff --git 
a/kernel/sql-translator/provider/jooq/src/main/java/org/apache/shardingsphere/sqltranslator/jooq/JooQSQLTranslator.java
 
b/kernel/sql-translator/provider/jooq/src/main/java/org/apache/shardingsphere/sqltranslator/jooq/JooQSQLTranslator.java
deleted file mode 100644
index 98e323c87bd..00000000000
--- 
a/kernel/sql-translator/provider/jooq/src/main/java/org/apache/shardingsphere/sqltranslator/jooq/JooQSQLTranslator.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.sqltranslator.jooq;
-
-import org.apache.shardingsphere.infra.database.core.type.DatabaseType;
-import 
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
-import org.apache.shardingsphere.infra.metadata.database.rule.RuleMetaData;
-import org.apache.shardingsphere.infra.session.query.QueryContext;
-import org.apache.shardingsphere.sqltranslator.context.SQLTranslatorContext;
-import 
org.apache.shardingsphere.sqltranslator.exception.syntax.UnsupportedTranslatedSQLException;
-import org.apache.shardingsphere.sqltranslator.spi.SQLTranslator;
-import org.jooq.Query;
-import org.jooq.impl.DSL;
-
-import java.util.List;
-
-/**
- * JOOQ SQL translator.
- */
-public final class JooQSQLTranslator implements SQLTranslator {
-    
-    @Override
-    public SQLTranslatorContext translate(final String sql, final List<Object> 
parameters, final QueryContext queryContext, final DatabaseType storageType, 
final ShardingSphereDatabase database,
-                                          final RuleMetaData 
globalRuleMetaData) {
-        try {
-            Query query = 
DSL.using(JooQDialectRegistry.getSQLDialect(queryContext.getSqlStatementContext().getDatabaseType())).parser().parseQuery(sql);
-            return new 
SQLTranslatorContext(DSL.using(JooQDialectRegistry.getSQLDialect(storageType)).render(query),
 parameters);
-            // CHECKSTYLE:OFF
-        } catch (final Exception ignored) {
-            // CHECKSTYLE:ON
-            throw new UnsupportedTranslatedSQLException(sql);
-        }
-    }
-    
-    @Override
-    public String getType() {
-        return "JOOQ";
-    }
-}
diff --git 
a/kernel/sql-translator/provider/jooq/src/main/resources/META-INF/services/org.apache.shardingsphere.sqltranslator.spi.SQLTranslator
 
b/kernel/sql-translator/provider/jooq/src/main/resources/META-INF/services/org.apache.shardingsphere.sqltranslator.spi.SQLTranslator
deleted file mode 100644
index a4a97f8e049..00000000000
--- 
a/kernel/sql-translator/provider/jooq/src/main/resources/META-INF/services/org.apache.shardingsphere.sqltranslator.spi.SQLTranslator
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-org.apache.shardingsphere.sqltranslator.jooq.JooQSQLTranslator
diff --git a/kernel/sql-translator/provider/pom.xml 
b/kernel/sql-translator/provider/pom.xml
index 2cc9aa74787..5f6a3d20aa2 100644
--- a/kernel/sql-translator/provider/pom.xml
+++ b/kernel/sql-translator/provider/pom.xml
@@ -29,6 +29,5 @@
     
     <modules>
         <module>native</module>
-        <module>jooq</module>
     </modules>
 </project>
diff --git a/pom.xml b/pom.xml
index 3469b1abdb2..820a82c6cb7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -127,8 +127,6 @@
         
         <hikari-cp.version>4.0.3</hikari-cp.version>
         
-        <jooq.version>3.14.15</jooq.version>
-        
         
<prometheus-simpleclient.version>0.11.0</prometheus-simpleclient.version>
         <prometheus-jmx.version>0.16.1</prometheus-jmx.version>
         <opentelemetry.version>1.31.0</opentelemetry.version>

Reply via email to