You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by wu...@apache.org on 2021/06/15 07:16:21 UTC

[shardingsphere] branch master updated: Merge SPI for rule dist sql (#10813)

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

wuweijie 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 9249c47  Merge SPI for rule dist sql (#10813)
9249c47 is described below

commit 9249c47444282f9193757fedbfd61524e056e6dd
Author: Liang Zhang <te...@163.com>
AuthorDate: Tue Jun 15 15:15:48 2021 +0800

    Merge SPI for rule dist sql (#10813)
---
 .../core/rule/RuleSQLStatementParserEngine.java    | 20 ++++--------
 .../distsql/parser/spi/RuleSQLParserFacade.java    | 33 -------------------
 ...cade.java => RuleSQLStatementParserFacade.java} |  5 +--
 ...riteSplittingRuleSQLStatementVisitorFacade.java | 38 ----------------------
 ...adwriteSplittingRuleStatementParserFacade.java} | 13 ++++++--
 ...istsql.parser.spi.RuleSQLStatementParserFacade} |  2 +-
 ...istsql.parser.spi.RuleSQLStatementVisitorFacade | 18 ----------
 .../ShardingRuleSQLStatementVisitorFacade.java     | 38 ----------------------
 ...java => ShardingRuleStatementParserFacade.java} | 13 ++++++--
 ...istsql.parser.spi.RuleSQLStatementParserFacade} |  2 +-
 ...istsql.parser.spi.RuleSQLStatementVisitorFacade | 18 ----------
 11 files changed, 31 insertions(+), 169 deletions(-)

diff --git a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-engine/src/main/java/org/apache/shardingsphere/distsql/parser/core/rule/RuleSQLStatementParserEngine.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-engine/src/main/java/org/apache/shardingsphere/distsql/parser/core/rule/RuleSQLStatementParserEngine.java
index 82dfeeb..9dc9681 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-engine/src/main/java/org/apache/shardingsphere/distsql/parser/core/rule/RuleSQLStatementParserEngine.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-engine/src/main/java/org/apache/shardingsphere/distsql/parser/core/rule/RuleSQLStatementParserEngine.java
@@ -21,17 +21,14 @@ import lombok.SneakyThrows;
 import org.antlr.v4.runtime.misc.ParseCancellationException;
 import org.antlr.v4.runtime.tree.ErrorNode;
 import org.antlr.v4.runtime.tree.ParseTreeVisitor;
-import org.apache.shardingsphere.distsql.parser.spi.RuleSQLParserFacade;
-import org.apache.shardingsphere.distsql.parser.spi.RuleSQLStatementVisitorFacade;
+import org.apache.shardingsphere.distsql.parser.spi.RuleSQLStatementParserFacade;
 import org.apache.shardingsphere.sql.parser.api.visitor.SQLVisitor;
 import org.apache.shardingsphere.sql.parser.core.ParseASTNode;
 import org.apache.shardingsphere.sql.parser.core.SQLParserFactory;
 import org.apache.shardingsphere.sql.parser.exception.SQLParsingException;
 import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
 
-import java.util.Collection;
 import java.util.HashMap;
-import java.util.LinkedList;
 import java.util.Map;
 import java.util.ServiceLoader;
 
@@ -40,16 +37,11 @@ import java.util.ServiceLoader;
  */
 public final class RuleSQLStatementParserEngine {
     
-    private static final Collection<RuleSQLParserFacade> PARSER_FACADES = new LinkedList<>();
-    
-    private static final Map<String, RuleSQLStatementVisitorFacade> VISITOR_FACADES = new HashMap<>();
+    private static final Map<String, RuleSQLStatementParserFacade> FACADES = new HashMap<>();
     
     static {
-        for (RuleSQLParserFacade each : ServiceLoader.load(RuleSQLParserFacade.class)) {
-            PARSER_FACADES.add(each);
-        }
-        for (RuleSQLStatementVisitorFacade each : ServiceLoader.load(RuleSQLStatementVisitorFacade.class)) {
-            VISITOR_FACADES.put(each.getRuleType(), each);
+        for (RuleSQLStatementParserFacade each : ServiceLoader.load(RuleSQLStatementParserFacade.class)) {
+            FACADES.put(each.getRuleType(), each);
         }
     }
     
@@ -65,7 +57,7 @@ public final class RuleSQLStatementParserEngine {
     }
     
     private RuleParseASTNode parseToASTNode(final String sql) {
-        for (RuleSQLParserFacade each : PARSER_FACADES) {
+        for (RuleSQLStatementParserFacade each : FACADES.values()) {
             try {
                 ParseASTNode parseASTNode = (ParseASTNode) SQLParserFactory.newInstance(sql, each.getLexerClass(), each.getParserClass()).parse();
                 return new RuleParseASTNode(each.getRuleType(), parseASTNode);
@@ -78,7 +70,7 @@ public final class RuleSQLStatementParserEngine {
     @SneakyThrows(ReflectiveOperationException.class)
     @SuppressWarnings("rawtypes")
     private SQLStatement getSQLStatement(final String sql, final String featureType, final ParseASTNode parseASTNode) {
-        SQLVisitor visitor = VISITOR_FACADES.get(featureType).getVisitorClass().newInstance();
+        SQLVisitor visitor = FACADES.get(featureType).getVisitorClass().newInstance();
         if (parseASTNode.getRootNode() instanceof ErrorNode) {
             throw new SQLParsingException("Unsupported SQL of `%s`", sql);
         }
diff --git a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-engine/src/main/java/org/apache/shardingsphere/distsql/parser/spi/RuleSQLParserFacade.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-engine/src/main/java/org/apache/shardingsphere/distsql/parser/spi/RuleSQLParserFacade.java
deleted file mode 100644
index 648f1b8..0000000
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-engine/src/main/java/org/apache/shardingsphere/distsql/parser/spi/RuleSQLParserFacade.java
+++ /dev/null
@@ -1,33 +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.distsql.parser.spi;
-
-import org.apache.shardingsphere.sql.parser.spi.SQLParserFacade;
-
-/**
- * Rule SQL parser facade.
- */
-public interface RuleSQLParserFacade extends SQLParserFacade {
-    
-    /**
-     * Get rule type.
-     *
-     * @return rule type
-     */
-    String getRuleType();
-}
diff --git a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-engine/src/main/java/org/apache/shardingsphere/distsql/parser/spi/RuleSQLStatementVisitorFacade.java b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-engine/src/main/java/org/apache/shardingsphere/distsql/parser/spi/RuleSQLStatementParserFacade.java
similarity index 87%
rename from shardingsphere-distsql-parser/shardingsphere-distsql-parser-engine/src/main/java/org/apache/shardingsphere/distsql/parser/spi/RuleSQLStatementVisitorFacade.java
rename to shardingsphere-distsql-parser/shardingsphere-distsql-parser-engine/src/main/java/org/apache/shardingsphere/distsql/parser/spi/RuleSQLStatementParserFacade.java
index 423ee68..989360d 100644
--- a/shardingsphere-distsql-parser/shardingsphere-distsql-parser-engine/src/main/java/org/apache/shardingsphere/distsql/parser/spi/RuleSQLStatementVisitorFacade.java
+++ b/shardingsphere-distsql-parser/shardingsphere-distsql-parser-engine/src/main/java/org/apache/shardingsphere/distsql/parser/spi/RuleSQLStatementParserFacade.java
@@ -18,11 +18,12 @@
 package org.apache.shardingsphere.distsql.parser.spi;
 
 import org.apache.shardingsphere.sql.parser.api.visitor.SQLVisitor;
+import org.apache.shardingsphere.sql.parser.spi.SQLParserFacade;
 
 /**
- * Rule SQL statement visitor facade.
+ * Rule SQL statement parser facade.
  */
-public interface RuleSQLStatementVisitorFacade {
+public interface RuleSQLStatementParserFacade extends SQLParserFacade {
     
     /**
      * Get visitor class.
diff --git a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/parser/facade/ReadwriteSplittingRuleSQLStatementVisitorFacade.java b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/parser/facade/ReadwriteSplittingRuleSQLStatementVisitorFacade.java
deleted file mode 100644
index 8741450..0000000
--- a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/parser/facade/ReadwriteSplittingRuleSQLStatementVisitorFacade.java
+++ /dev/null
@@ -1,38 +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.readwritesplitting.distsql.parser.facade;
-
-import org.apache.shardingsphere.distsql.parser.spi.RuleSQLStatementVisitorFacade;
-import org.apache.shardingsphere.readwritesplitting.distsql.parser.core.ReadwriteSplittingRuleDistSQLStatementVisitor;
-import org.apache.shardingsphere.sql.parser.api.visitor.SQLVisitor;
-
-/**
- * SQL statement visitor facade for readwrite-splitting rule.
- */
-public final class ReadwriteSplittingRuleSQLStatementVisitorFacade implements RuleSQLStatementVisitorFacade {
-    
-    @Override
-    public Class<? extends SQLVisitor> getVisitorClass() {
-        return ReadwriteSplittingRuleDistSQLStatementVisitor.class;
-    }
-    
-    @Override
-    public String getRuleType() {
-        return "Readwrite-splitting";
-    }
-}
diff --git a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/parser/facade/ReadwriteSplittingRuleParserFacade.java b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/parser/facade/ReadwriteSplittingRuleStatementParserFacade.java
similarity index 72%
rename from shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/parser/facade/ReadwriteSplittingRuleParserFacade.java
rename to shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/parser/facade/ReadwriteSplittingRuleStatementParserFacade.java
index 74abc23..c4aee59 100644
--- a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/parser/facade/ReadwriteSplittingRuleParserFacade.java
+++ b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/parser/facade/ReadwriteSplittingRuleStatementParserFacade.java
@@ -17,16 +17,18 @@
 
 package org.apache.shardingsphere.readwritesplitting.distsql.parser.facade;
 
-import org.apache.shardingsphere.distsql.parser.spi.RuleSQLParserFacade;
+import org.apache.shardingsphere.distsql.parser.spi.RuleSQLStatementParserFacade;
+import org.apache.shardingsphere.readwritesplitting.distsql.parser.core.ReadwriteSplittingRuleDistSQLStatementVisitor;
 import org.apache.shardingsphere.readwritesplitting.distsql.parser.core.ReadwriteSplittingRuleLexer;
 import org.apache.shardingsphere.readwritesplitting.distsql.parser.core.ReadwriteSplittingRuleParser;
 import org.apache.shardingsphere.sql.parser.api.parser.SQLLexer;
 import org.apache.shardingsphere.sql.parser.api.parser.SQLParser;
+import org.apache.shardingsphere.sql.parser.api.visitor.SQLVisitor;
 
 /**
- * SQL parser facade for readwrite-splitting rule.
+ * SQL parser facade for readwrite-splitting rule statement.
  */
-public final class ReadwriteSplittingRuleParserFacade implements RuleSQLParserFacade {
+public final class ReadwriteSplittingRuleStatementParserFacade implements RuleSQLStatementParserFacade {
     
     @Override
     public Class<? extends SQLLexer> getLexerClass() {
@@ -39,6 +41,11 @@ public final class ReadwriteSplittingRuleParserFacade implements RuleSQLParserFa
     }
     
     @Override
+    public Class<? extends SQLVisitor> getVisitorClass() {
+        return ReadwriteSplittingRuleDistSQLStatementVisitor.class;
+    }
+    
+    @Override
     public String getRuleType() {
         return "Readwrite-splitting";
     }
diff --git a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.parser.spi.RuleSQLParserFacade b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.parser.spi.RuleSQLStatementParserFacade
similarity index 94%
rename from shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.parser.spi.RuleSQLParserFacade
rename to shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.parser.spi.RuleSQLStatementParserFacade
index 89cfc4e..6a877b9 100644
--- a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.parser.spi.RuleSQLParserFacade
+++ b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.parser.spi.RuleSQLStatementParserFacade
@@ -15,4 +15,4 @@
 # limitations under the License.
 #
 
-org.apache.shardingsphere.readwritesplitting.distsql.parser.facade.ReadwriteSplittingRuleParserFacade
+org.apache.shardingsphere.readwritesplitting.distsql.parser.facade.ReadwriteSplittingRuleStatementParserFacade
diff --git a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.parser.spi.RuleSQLStatementVisitorFacade b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.parser.spi.RuleSQLStatementVisitorFacade
deleted file mode 100644
index 45cc175..0000000
--- a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.parser.spi.RuleSQLStatementVisitorFacade
+++ /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.readwritesplitting.distsql.parser.facade.ReadwriteSplittingRuleSQLStatementVisitorFacade
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/facade/ShardingRuleSQLStatementVisitorFacade.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/facade/ShardingRuleSQLStatementVisitorFacade.java
deleted file mode 100644
index 74958fa..0000000
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/facade/ShardingRuleSQLStatementVisitorFacade.java
+++ /dev/null
@@ -1,38 +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.sharding.distsql.parser.facade;
-
-import org.apache.shardingsphere.distsql.parser.spi.RuleSQLStatementVisitorFacade;
-import org.apache.shardingsphere.sharding.distsql.parser.core.ShardingRuleDistSQLStatementVisitor;
-import org.apache.shardingsphere.sql.parser.api.visitor.SQLVisitor;
-
-/**
- * SQL statement visitor facade for sharding rule .
- */
-public final class ShardingRuleSQLStatementVisitorFacade implements RuleSQLStatementVisitorFacade {
-    
-    @Override
-    public Class<? extends SQLVisitor> getVisitorClass() {
-        return ShardingRuleDistSQLStatementVisitor.class;
-    }
-    
-    @Override
-    public String getRuleType() {
-        return "Sharding";
-    }
-}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/facade/ShardingRuleParserFacade.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/facade/ShardingRuleStatementParserFacade.java
similarity index 73%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/facade/ShardingRuleParserFacade.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/facade/ShardingRuleStatementParserFacade.java
index 446be52..d29468d 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/facade/ShardingRuleParserFacade.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/facade/ShardingRuleStatementParserFacade.java
@@ -17,16 +17,18 @@
 
 package org.apache.shardingsphere.sharding.distsql.parser.facade;
 
-import org.apache.shardingsphere.distsql.parser.spi.RuleSQLParserFacade;
+import org.apache.shardingsphere.distsql.parser.spi.RuleSQLStatementParserFacade;
+import org.apache.shardingsphere.sharding.distsql.parser.core.ShardingRuleDistSQLStatementVisitor;
 import org.apache.shardingsphere.sharding.distsql.parser.core.ShardingRuleLexer;
 import org.apache.shardingsphere.sharding.distsql.parser.core.ShardingRuleParser;
 import org.apache.shardingsphere.sql.parser.api.parser.SQLLexer;
 import org.apache.shardingsphere.sql.parser.api.parser.SQLParser;
+import org.apache.shardingsphere.sql.parser.api.visitor.SQLVisitor;
 
 /**
- * SQL parser facade for sharding rule.
+ * SQL parser facade for sharding rule statement.
  */
-public final class ShardingRuleParserFacade implements RuleSQLParserFacade {
+public final class ShardingRuleStatementParserFacade implements RuleSQLStatementParserFacade {
     
     @Override
     public Class<? extends SQLLexer> getLexerClass() {
@@ -39,6 +41,11 @@ public final class ShardingRuleParserFacade implements RuleSQLParserFacade {
     }
     
     @Override
+    public Class<? extends SQLVisitor> getVisitorClass() {
+        return ShardingRuleDistSQLStatementVisitor.class;
+    }
+    
+    @Override
     public String getRuleType() {
         return "Sharding";
     }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.parser.spi.RuleSQLParserFacade b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.parser.spi.RuleSQLStatementParserFacade
similarity index 96%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.parser.spi.RuleSQLParserFacade
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.parser.spi.RuleSQLStatementParserFacade
index 319ee6b..fcb17bd 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.parser.spi.RuleSQLParserFacade
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.parser.spi.RuleSQLStatementParserFacade
@@ -15,4 +15,4 @@
 # limitations under the License.
 #
 
-org.apache.shardingsphere.sharding.distsql.parser.facade.ShardingRuleParserFacade
+org.apache.shardingsphere.sharding.distsql.parser.facade.ShardingRuleStatementParserFacade
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.parser.spi.RuleSQLStatementVisitorFacade b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.parser.spi.RuleSQLStatementVisitorFacade
deleted file mode 100644
index 3516303..0000000
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.parser.spi.RuleSQLStatementVisitorFacade
+++ /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.sharding.distsql.parser.facade.ShardingRuleSQLStatementVisitorFacade