This is an automated email from the ASF dual-hosted git repository. zhangliang 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 0ffbc4fd75a Reuse standard SQLStatement and remove unnecessary clickhouse SQLStatements (#35543) 0ffbc4fd75a is described below commit 0ffbc4fd75a5897cfe569ae6a07342fc8d4c1fdd Author: Liang Zhang <zhangli...@apache.org> AuthorDate: Wed May 28 23:35:36 2025 +0800 Reuse standard SQLStatement and remove unnecessary clickhouse SQLStatements (#35543) --- parser/sql/dialect/clickhouse/pom.xml | 5 --- .../type/ClickHouseDMLStatementVisitor.java | 22 ++++++------ .../core/statement/dml/DeleteStatement.java | 2 +- .../core/statement/dml/InsertStatement.java | 2 +- .../core/statement/dml/SelectStatement.java | 2 +- .../core/statement/dml/UpdateStatement.java | 2 +- parser/sql/statement/type/clickhouse/pom.xml | 36 ------------------- .../statement/clickhouse/ClickHouseStatement.java | 26 -------------- .../ddl/ClickHouseAlterTableStatement.java | 27 --------------- .../ddl/ClickHouseCreateTableStatement.java | 40 ---------------------- .../ddl/ClickHouseDropTableStatement.java | 27 --------------- .../clickhouse/dml/ClickHouseDeleteStatement.java | 27 --------------- .../clickhouse/dml/ClickHouseInsertStatement.java | 27 --------------- .../clickhouse/dml/ClickHouseSelectStatement.java | 27 --------------- .../clickhouse/dml/ClickHouseUpdateStatement.java | 27 --------------- parser/sql/statement/type/pom.xml | 1 - test/it/parser/pom.xml | 5 --- 17 files changed, 15 insertions(+), 290 deletions(-) diff --git a/parser/sql/dialect/clickhouse/pom.xml b/parser/sql/dialect/clickhouse/pom.xml index 85dedbcf72c..4a96f5e3635 100644 --- a/parser/sql/dialect/clickhouse/pom.xml +++ b/parser/sql/dialect/clickhouse/pom.xml @@ -36,10 +36,5 @@ <artifactId>shardingsphere-infra-database-clickhouse</artifactId> <version>${project.version}</version> </dependency> - <dependency> - <groupId>org.apache.shardingsphere</groupId> - <artifactId>shardingsphere-parser-sql-statement-clickhouse</artifactId> - <version>${project.version}</version> - </dependency> </dependencies> </project> diff --git a/parser/sql/dialect/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/clickhouse/visitor/statement/type/ClickHouseDMLStatementVisitor.java b/parser/sql/dialect/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/clickhouse/visitor/statement/type/ClickHouseDMLStatementVisitor.java index 93a02615e76..6d676cf34a3 100644 --- a/parser/sql/dialect/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/clickhouse/visitor/statement/type/ClickHouseDMLStatementVisitor.java +++ b/parser/sql/dialect/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/clickhouse/visitor/statement/type/ClickHouseDMLStatementVisitor.java @@ -29,10 +29,6 @@ import org.apache.shardingsphere.sql.parser.autogen.ClickHouseStatementParser.In import org.apache.shardingsphere.sql.parser.autogen.ClickHouseStatementParser.SelectClauseContext; import org.apache.shardingsphere.sql.parser.autogen.ClickHouseStatementParser.SubqueryContext; import org.apache.shardingsphere.sql.parser.clickhouse.visitor.statement.ClickHouseStatementVisitor; -import org.apache.shardingsphere.sql.parser.statement.clickhouse.dml.ClickHouseDeleteStatement; -import org.apache.shardingsphere.sql.parser.statement.clickhouse.dml.ClickHouseInsertStatement; -import org.apache.shardingsphere.sql.parser.statement.clickhouse.dml.ClickHouseSelectStatement; -import org.apache.shardingsphere.sql.parser.statement.clickhouse.dml.ClickHouseUpdateStatement; import org.apache.shardingsphere.sql.parser.statement.core.enums.JoinType; import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.assignment.ColumnAssignmentSegment; import org.apache.shardingsphere.sql.parser.statement.core.segment.dml.assignment.InsertValuesSegment; @@ -64,6 +60,10 @@ import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table.SimpleTableSegment; import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table.SubqueryTableSegment; import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table.TableSegment; +import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.DeleteStatement; +import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.InsertStatement; +import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.SelectStatement; +import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.UpdateStatement; import org.apache.shardingsphere.sql.parser.statement.core.value.collection.CollectionValue; import org.apache.shardingsphere.sql.parser.statement.core.value.identifier.IdentifierValue; import org.apache.shardingsphere.sql.parser.statement.core.value.literal.impl.BooleanLiteralValue; @@ -81,7 +81,7 @@ public final class ClickHouseDMLStatementVisitor extends ClickHouseStatementVisi @Override public ASTNode visitInsert(final InsertContext ctx) { - ClickHouseInsertStatement result = (ClickHouseInsertStatement) visit(ctx.insertValuesClause()); + InsertStatement result = (InsertStatement) visit(ctx.insertValuesClause()); result.setTable((SimpleTableSegment) visit(ctx.tableName())); result.addParameterMarkerSegments(getParameterMarkerSegments()); return result; @@ -90,7 +90,7 @@ public final class ClickHouseDMLStatementVisitor extends ClickHouseStatementVisi @SuppressWarnings("unchecked") @Override public ASTNode visitInsertValuesClause(final InsertValuesClauseContext ctx) { - ClickHouseInsertStatement result = new ClickHouseInsertStatement(); + InsertStatement result = new InsertStatement(); if (null != ctx.columnNames()) { ColumnNamesContext columnNames = ctx.columnNames(); CollectionValue<ColumnSegment> columnSegments = (CollectionValue<ColumnSegment>) visit(columnNames); @@ -112,7 +112,7 @@ public final class ClickHouseDMLStatementVisitor extends ClickHouseStatementVisi @Override public ASTNode visitUpdate(final ClickHouseStatementParser.UpdateContext ctx) { - ClickHouseUpdateStatement result = new ClickHouseUpdateStatement(); + UpdateStatement result = new UpdateStatement(); result.setTable((TableSegment) visit(ctx.tableReferences())); result.setSetAssignment((SetAssignmentSegment) visit(ctx.setAssignmentsClause())); if (null != ctx.whereClause()) { @@ -162,7 +162,7 @@ public final class ClickHouseDMLStatementVisitor extends ClickHouseStatementVisi @Override public ASTNode visitDelete(final DeleteContext ctx) { - ClickHouseDeleteStatement result = new ClickHouseDeleteStatement(); + DeleteStatement result = new DeleteStatement(); result.setTable((SimpleTableSegment) visit(ctx.tableName())); if (null != ctx.whereClause()) { result.setWhere((WhereSegment) visit(ctx.whereClause())); @@ -183,7 +183,7 @@ public final class ClickHouseDMLStatementVisitor extends ClickHouseStatementVisi @Override public ASTNode visitSelect(final ClickHouseStatementParser.SelectContext ctx) { // TODO :Unsupported for withClause. - ClickHouseSelectStatement result = (ClickHouseSelectStatement) visit(ctx.combineClause()); + SelectStatement result = (SelectStatement) visit(ctx.combineClause()); result.addParameterMarkerSegments(getParameterMarkerSegments()); return result; } @@ -196,7 +196,7 @@ public final class ClickHouseDMLStatementVisitor extends ClickHouseStatementVisi @Override public ASTNode visitSelectClause(final SelectClauseContext ctx) { - ClickHouseSelectStatement result = new ClickHouseSelectStatement(); + SelectStatement result = new SelectStatement(); result.setProjections((ProjectionsSegment) visit(ctx.projections())); if (!ctx.selectSpecification().isEmpty()) { result.getProjections().setDistinctRow(isDistinct(ctx.selectSpecification().get(0))); @@ -378,7 +378,7 @@ public final class ClickHouseDMLStatementVisitor extends ClickHouseStatementVisi @Override public ASTNode visitTableFactor(final ClickHouseStatementParser.TableFactorContext ctx) { if (null != ctx.subquery()) { - ClickHouseSelectStatement subquery = (ClickHouseSelectStatement) visit(ctx.subquery()); + SelectStatement subquery = (SelectStatement) visit(ctx.subquery()); SubquerySegment subquerySegment = new SubquerySegment(ctx.subquery().start.getStartIndex(), ctx.subquery().stop.getStopIndex(), subquery, getOriginalText(ctx.subquery())); SubqueryTableSegment result = new SubqueryTableSegment(ctx.start.getStartIndex(), ctx.stop.getStopIndex(), subquerySegment); if (null != ctx.alias()) { diff --git a/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/dml/DeleteStatement.java b/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/dml/DeleteStatement.java index 1e01afa2530..01c14870d31 100644 --- a/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/dml/DeleteStatement.java +++ b/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/dml/DeleteStatement.java @@ -34,7 +34,7 @@ import java.util.Optional; * Delete statement. */ @Setter -public abstract class DeleteStatement extends AbstractSQLStatement implements DMLStatement { +public class DeleteStatement extends AbstractSQLStatement implements DMLStatement { @Getter private TableSegment table; diff --git a/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/dml/InsertStatement.java b/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/dml/InsertStatement.java index 377187bbf52..1e0095f6a20 100644 --- a/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/dml/InsertStatement.java +++ b/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/dml/InsertStatement.java @@ -48,7 +48,7 @@ import java.util.Optional; */ @Getter @Setter -public abstract class InsertStatement extends AbstractSQLStatement implements DMLStatement { +public class InsertStatement extends AbstractSQLStatement implements DMLStatement { private SimpleTableSegment table; diff --git a/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/dml/SelectStatement.java b/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/dml/SelectStatement.java index 33b35962c3d..810e2f99d20 100644 --- a/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/dml/SelectStatement.java +++ b/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/dml/SelectStatement.java @@ -41,7 +41,7 @@ import java.util.Optional; */ @Getter @Setter -public abstract class SelectStatement extends AbstractSQLStatement implements DMLStatement { +public class SelectStatement extends AbstractSQLStatement implements DMLStatement { private ProjectionsSegment projections; diff --git a/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/dml/UpdateStatement.java b/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/dml/UpdateStatement.java index c8c708c29dd..f74e00a9706 100644 --- a/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/dml/UpdateStatement.java +++ b/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/dml/UpdateStatement.java @@ -37,7 +37,7 @@ import java.util.Optional; */ @Getter @Setter -public abstract class UpdateStatement extends AbstractSQLStatement implements DMLStatement { +public class UpdateStatement extends AbstractSQLStatement implements DMLStatement { private TableSegment table; diff --git a/parser/sql/statement/type/clickhouse/pom.xml b/parser/sql/statement/type/clickhouse/pom.xml deleted file mode 100644 index dd17556d479..00000000000 --- a/parser/sql/statement/type/clickhouse/pom.xml +++ /dev/null @@ -1,36 +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-parser-sql-statement-type</artifactId> - <version>5.5.3-SNAPSHOT</version> - </parent> - <artifactId>shardingsphere-parser-sql-statement-clickhouse</artifactId> - <name>${project.artifactId}</name> - - <dependencies> - <dependency> - <groupId>org.apache.shardingsphere</groupId> - <artifactId>shardingsphere-parser-sql-statement-core</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> -</project> diff --git a/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/ClickHouseStatement.java b/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/ClickHouseStatement.java deleted file mode 100644 index 38bbceb642f..00000000000 --- a/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/ClickHouseStatement.java +++ /dev/null @@ -1,26 +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.sql.parser.statement.clickhouse; - -import org.apache.shardingsphere.sql.parser.statement.core.statement.SQLStatement; - -/** - * ClickHouse statement. - */ -public interface ClickHouseStatement extends SQLStatement { -} diff --git a/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/ddl/ClickHouseAlterTableStatement.java b/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/ddl/ClickHouseAlterTableStatement.java deleted file mode 100644 index 7ecfe07ca42..00000000000 --- a/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/ddl/ClickHouseAlterTableStatement.java +++ /dev/null @@ -1,27 +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.sql.parser.statement.clickhouse.ddl; - -import org.apache.shardingsphere.sql.parser.statement.core.statement.ddl.AlterTableStatement; -import org.apache.shardingsphere.sql.parser.statement.clickhouse.ClickHouseStatement; - -/** - * ClickHouse alter table statement. - */ -public final class ClickHouseAlterTableStatement extends AlterTableStatement implements ClickHouseStatement { -} diff --git a/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/ddl/ClickHouseCreateTableStatement.java b/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/ddl/ClickHouseCreateTableStatement.java deleted file mode 100644 index 9893ff07821..00000000000 --- a/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/ddl/ClickHouseCreateTableStatement.java +++ /dev/null @@ -1,40 +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.sql.parser.statement.clickhouse.ddl; - -import lombok.Getter; -import lombok.RequiredArgsConstructor; -import lombok.Setter; -import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table.SimpleTableSegment; -import org.apache.shardingsphere.sql.parser.statement.core.statement.ddl.CreateTableStatement; -import org.apache.shardingsphere.sql.parser.statement.clickhouse.ClickHouseStatement; - -/** - * ClickHouse create table statement. - */ -@RequiredArgsConstructor -@Getter -@Setter -public final class ClickHouseCreateTableStatement extends CreateTableStatement implements ClickHouseStatement { - - private SimpleTableSegment uuidClause; - - private SimpleTableSegment clusterClause; - - private SimpleTableSegment tableSchemaClause; -} diff --git a/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/ddl/ClickHouseDropTableStatement.java b/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/ddl/ClickHouseDropTableStatement.java deleted file mode 100644 index 33a41791292..00000000000 --- a/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/ddl/ClickHouseDropTableStatement.java +++ /dev/null @@ -1,27 +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.sql.parser.statement.clickhouse.ddl; - -import org.apache.shardingsphere.sql.parser.statement.core.statement.ddl.DropTableStatement; -import org.apache.shardingsphere.sql.parser.statement.clickhouse.ClickHouseStatement; - -/** - * ClickHouse drop table statement. - */ -public final class ClickHouseDropTableStatement extends DropTableStatement implements ClickHouseStatement { -} diff --git a/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/dml/ClickHouseDeleteStatement.java b/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/dml/ClickHouseDeleteStatement.java deleted file mode 100644 index 188f0db4913..00000000000 --- a/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/dml/ClickHouseDeleteStatement.java +++ /dev/null @@ -1,27 +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.sql.parser.statement.clickhouse.dml; - -import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.DeleteStatement; -import org.apache.shardingsphere.sql.parser.statement.clickhouse.ClickHouseStatement; - -/** - * ClickHouse delete statement. - */ -public final class ClickHouseDeleteStatement extends DeleteStatement implements ClickHouseStatement { -} diff --git a/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/dml/ClickHouseInsertStatement.java b/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/dml/ClickHouseInsertStatement.java deleted file mode 100644 index 132395b21f4..00000000000 --- a/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/dml/ClickHouseInsertStatement.java +++ /dev/null @@ -1,27 +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.sql.parser.statement.clickhouse.dml; - -import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.InsertStatement; -import org.apache.shardingsphere.sql.parser.statement.clickhouse.ClickHouseStatement; - -/** - * ClickHouse insert statement. - */ -public final class ClickHouseInsertStatement extends InsertStatement implements ClickHouseStatement { -} diff --git a/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/dml/ClickHouseSelectStatement.java b/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/dml/ClickHouseSelectStatement.java deleted file mode 100644 index df9164fc947..00000000000 --- a/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/dml/ClickHouseSelectStatement.java +++ /dev/null @@ -1,27 +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.sql.parser.statement.clickhouse.dml; - -import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.SelectStatement; -import org.apache.shardingsphere.sql.parser.statement.clickhouse.ClickHouseStatement; - -/** - * ClickHouse select statement. - */ -public final class ClickHouseSelectStatement extends SelectStatement implements ClickHouseStatement { -} diff --git a/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/dml/ClickHouseUpdateStatement.java b/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/dml/ClickHouseUpdateStatement.java deleted file mode 100644 index c0e32bc09a4..00000000000 --- a/parser/sql/statement/type/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/statement/clickhouse/dml/ClickHouseUpdateStatement.java +++ /dev/null @@ -1,27 +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.sql.parser.statement.clickhouse.dml; - -import org.apache.shardingsphere.sql.parser.statement.core.statement.dml.UpdateStatement; -import org.apache.shardingsphere.sql.parser.statement.clickhouse.ClickHouseStatement; - -/** - * ClickHouse update statement. - */ -public final class ClickHouseUpdateStatement extends UpdateStatement implements ClickHouseStatement { -} diff --git a/parser/sql/statement/type/pom.xml b/parser/sql/statement/type/pom.xml index 3b55a94af1b..6f6102af2df 100644 --- a/parser/sql/statement/type/pom.xml +++ b/parser/sql/statement/type/pom.xml @@ -28,7 +28,6 @@ <name>${project.artifactId}</name> <modules> - <module>clickhouse</module> <module>doris</module> <module>firebird</module> <module>hive</module> diff --git a/test/it/parser/pom.xml b/test/it/parser/pom.xml index b7993dc8087..88c5b6d062f 100644 --- a/test/it/parser/pom.xml +++ b/test/it/parser/pom.xml @@ -152,11 +152,6 @@ <artifactId>shardingsphere-parser-sql-statement-presto</artifactId> <version>${project.version}</version> </dependency> - <dependency> - <groupId>org.apache.shardingsphere</groupId> - <artifactId>shardingsphere-parser-sql-statement-clickhouse</artifactId> - <version>${project.version}</version> - </dependency> <dependency> <groupId>org.apache.shardingsphere</groupId> <artifactId>shardingsphere-parser-sql-statement-doris</artifactId>