From 99b00979cc948b4e351d442a2900f6c741d0bcfe Mon Sep 17 00:00:00 2001 From: Shamil Valiev <35022048+shamilv@users.noreply.github.com> Date: Tue, 29 Oct 2024 06:57:45 +0100 Subject: [PATCH] Add Doris grammar rules and tests --- .../statement/type/DorisDALStatementVisitor.java | 11 +++++------ .../core/statement/dal/RecoverPartitionStatement.java | 1 - 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/parser/sql/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/doris/visitor/statement/type/DorisDALStatementVisitor.java b/parser/sql/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/doris/visitor/statement/type/DorisDALStatementVisitor.java index 85c4fce89ce3f..807c281389ed6 100644 --- a/parser/sql/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/doris/visitor/statement/type/DorisDALStatementVisitor.java +++ b/parser/sql/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/doris/visitor/statement/type/DorisDALStatementVisitor.java @@ -163,7 +163,9 @@ import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisKillStatement; import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisLoadIndexInfoStatement; import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisOptimizeTableStatement; +import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisRecoverDatabaseStatement; import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisRecoverPartitionStatement; +import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisRecoverTableStatement; import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisRepairTableStatement; import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisResetPersistStatement; import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisResetStatement; @@ -216,17 +218,14 @@ import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisUninstallComponentStatement; import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisUninstallPluginStatement; import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisUseStatement; -import org.apache.shardingsphere.sql.parser.statement.core.segment.dal.ResetMasterOptionSegment; -import org.apache.shardingsphere.sql.parser.statement.core.segment.dal.ResetOptionSegment; -import org.apache.shardingsphere.sql.parser.statement.core.segment.dal.ResetSlaveOptionSegment; -import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisRecoverDatabaseStatement; -import org.apache.shardingsphere.sql.parser.statement.doris.dal.DorisRecoverTableStatement; import java.util.Collection; import java.util.LinkedList; import java.util.List; -import static org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.*; +import org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.RecoverDatabaseContext; +import org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.RecoverPartitionContext; +import org.apache.shardingsphere.sql.parser.autogen.DorisStatementParser.RecoverTableContext; /** * DAL statement visitor for Doris. diff --git a/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/dal/RecoverPartitionStatement.java b/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/dal/RecoverPartitionStatement.java index bd1bd26a53911..c8aff8f38c7e9 100644 --- a/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/dal/RecoverPartitionStatement.java +++ b/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/dal/RecoverPartitionStatement.java @@ -19,7 +19,6 @@ import lombok.Getter; import lombok.Setter; -import org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table.TableNameSegment; import org.apache.shardingsphere.sql.parser.statement.core.statement.AbstractSQLStatement; import org.apache.shardingsphere.sql.parser.statement.core.statement.ddl.DDLStatement;