You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by ji...@apache.org on 2023/02/09 03:28:46 UTC

[shardingsphere] branch master updated: RALStatement inheritance structure optimization. (#24065)

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

jianglongtao 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 a1322be8be4 RALStatement inheritance structure optimization. (#24065)
a1322be8be4 is described below

commit a1322be8be4c30333d57164f39bc17e181fcf87a
Author: yx9o <ya...@163.com>
AuthorDate: Thu Feb 9 11:28:31 2023 +0800

    RALStatement inheritance structure optimization. (#24065)
---
 .../ral/QueryableGlobalRuleRALStatement.java       | 24 ----------------------
 .../parser/statement/ral/ScalingRALStatement.java  | 24 ----------------------
 .../ral/scaling/UpdatableScalingRALStatement.java  |  4 ++--
 .../statement/ShowAuthorityRuleStatement.java      |  4 ++--
 .../queryable/ShowSQLParserRuleStatement.java      |  4 ++--
 .../statement/ShowSQLTranslatorRuleStatement.java  |  4 ++--
 .../queryable/ShowTrafficRulesStatement.java       |  4 ++--
 .../queryable/ShowTransactionRuleStatement.java    |  4 ++--
 8 files changed, 12 insertions(+), 60 deletions(-)

diff --git a/distsql/statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/ral/QueryableGlobalRuleRALStatement.java b/distsql/statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/ral/QueryableGlobalRuleRALStatement.java
deleted file mode 100644
index b1c9cac65fc..00000000000
--- a/distsql/statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/ral/QueryableGlobalRuleRALStatement.java
+++ /dev/null
@@ -1,24 +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.statement.ral;
-
-/**
- * Queryable RAL statement for global rule.
- */
-public abstract class QueryableGlobalRuleRALStatement extends QueryableRALStatement {
-}
diff --git a/distsql/statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/ral/ScalingRALStatement.java b/distsql/statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/ral/ScalingRALStatement.java
deleted file mode 100644
index 5eea0058c55..00000000000
--- a/distsql/statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/ral/ScalingRALStatement.java
+++ /dev/null
@@ -1,24 +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.statement.ral;
-
-/**
- * Scaling RAL statement.
- */
-public abstract class ScalingRALStatement extends RALStatement {
-}
diff --git a/distsql/statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/ral/scaling/UpdatableScalingRALStatement.java b/distsql/statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/ral/scaling/UpdatableScalingRALStatement.java
index 01d29c9896d..b8b2dc79a05 100644
--- a/distsql/statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/ral/scaling/UpdatableScalingRALStatement.java
+++ b/distsql/statement/src/main/java/org/apache/shardingsphere/distsql/parser/statement/ral/scaling/UpdatableScalingRALStatement.java
@@ -17,10 +17,10 @@
 
 package org.apache.shardingsphere.distsql.parser.statement.ral.scaling;
 
-import org.apache.shardingsphere.distsql.parser.statement.ral.ScalingRALStatement;
+import org.apache.shardingsphere.distsql.parser.statement.ral.UpdatableRALStatement;
 
 /**
  * Updatable RAL statement.
  */
-public abstract class UpdatableScalingRALStatement extends ScalingRALStatement {
+public abstract class UpdatableScalingRALStatement extends UpdatableRALStatement {
 }
diff --git a/kernel/authority/distsql/statement/src/main/java/org/apache/shardingsphere/authority/distsql/parser/statement/ShowAuthorityRuleStatement.java b/kernel/authority/distsql/statement/src/main/java/org/apache/shardingsphere/authority/distsql/parser/statement/ShowAuthorityRuleStatement.java
index eb1fe8d79e2..251fa867a78 100644
--- a/kernel/authority/distsql/statement/src/main/java/org/apache/shardingsphere/authority/distsql/parser/statement/ShowAuthorityRuleStatement.java
+++ b/kernel/authority/distsql/statement/src/main/java/org/apache/shardingsphere/authority/distsql/parser/statement/ShowAuthorityRuleStatement.java
@@ -17,10 +17,10 @@
 
 package org.apache.shardingsphere.authority.distsql.parser.statement;
 
-import org.apache.shardingsphere.distsql.parser.statement.ral.QueryableGlobalRuleRALStatement;
+import org.apache.shardingsphere.distsql.parser.statement.ral.QueryableRALStatement;
 
 /**
  * Show authority rule statement.
  */
-public final class ShowAuthorityRuleStatement extends QueryableGlobalRuleRALStatement {
+public final class ShowAuthorityRuleStatement extends QueryableRALStatement {
 }
diff --git a/kernel/parser/distsql/statement/src/main/java/org/apache/shardingsphere/parser/distsql/parser/statement/queryable/ShowSQLParserRuleStatement.java b/kernel/parser/distsql/statement/src/main/java/org/apache/shardingsphere/parser/distsql/parser/statement/queryable/ShowSQLParserRuleStatement.java
index 2697a33b498..81520469688 100644
--- a/kernel/parser/distsql/statement/src/main/java/org/apache/shardingsphere/parser/distsql/parser/statement/queryable/ShowSQLParserRuleStatement.java
+++ b/kernel/parser/distsql/statement/src/main/java/org/apache/shardingsphere/parser/distsql/parser/statement/queryable/ShowSQLParserRuleStatement.java
@@ -17,10 +17,10 @@
 
 package org.apache.shardingsphere.parser.distsql.parser.statement.queryable;
 
-import org.apache.shardingsphere.distsql.parser.statement.ral.QueryableGlobalRuleRALStatement;
+import org.apache.shardingsphere.distsql.parser.statement.ral.QueryableRALStatement;
 
 /**
  * Show SQL parser rule statement.
  */
-public final class ShowSQLParserRuleStatement extends QueryableGlobalRuleRALStatement {
+public final class ShowSQLParserRuleStatement extends QueryableRALStatement {
 }
diff --git a/kernel/sql-translator/distsql/statement/src/main/java/org/apache/shardingsphere/sqltranslator/distsql/parser/statement/ShowSQLTranslatorRuleStatement.java b/kernel/sql-translator/distsql/statement/src/main/java/org/apache/shardingsphere/sqltranslator/distsql/parser/statement/ShowSQLTranslatorRuleStatement.java
index 22a99cef5d4..9465da3fba5 100644
--- a/kernel/sql-translator/distsql/statement/src/main/java/org/apache/shardingsphere/sqltranslator/distsql/parser/statement/ShowSQLTranslatorRuleStatement.java
+++ b/kernel/sql-translator/distsql/statement/src/main/java/org/apache/shardingsphere/sqltranslator/distsql/parser/statement/ShowSQLTranslatorRuleStatement.java
@@ -17,10 +17,10 @@
 
 package org.apache.shardingsphere.sqltranslator.distsql.parser.statement;
 
-import org.apache.shardingsphere.distsql.parser.statement.ral.QueryableGlobalRuleRALStatement;
+import org.apache.shardingsphere.distsql.parser.statement.ral.QueryableRALStatement;
 
 /**
  * Show SQL translator rule statement.
  */
-public final class ShowSQLTranslatorRuleStatement extends QueryableGlobalRuleRALStatement {
+public final class ShowSQLTranslatorRuleStatement extends QueryableRALStatement {
 }
diff --git a/kernel/traffic/distsql/statement/src/main/java/org/apache/shardingsphere/traffic/distsql/parser/statement/queryable/ShowTrafficRulesStatement.java b/kernel/traffic/distsql/statement/src/main/java/org/apache/shardingsphere/traffic/distsql/parser/statement/queryable/ShowTrafficRulesStatement.java
index ead367ee3b9..b7a8d6375ea 100644
--- a/kernel/traffic/distsql/statement/src/main/java/org/apache/shardingsphere/traffic/distsql/parser/statement/queryable/ShowTrafficRulesStatement.java
+++ b/kernel/traffic/distsql/statement/src/main/java/org/apache/shardingsphere/traffic/distsql/parser/statement/queryable/ShowTrafficRulesStatement.java
@@ -19,14 +19,14 @@ package org.apache.shardingsphere.traffic.distsql.parser.statement.queryable;
 
 import lombok.Getter;
 import lombok.RequiredArgsConstructor;
-import org.apache.shardingsphere.distsql.parser.statement.ral.QueryableGlobalRuleRALStatement;
+import org.apache.shardingsphere.distsql.parser.statement.ral.QueryableRALStatement;
 
 /**
  * Show traffic rules statement.
  */
 @RequiredArgsConstructor
 @Getter
-public final class ShowTrafficRulesStatement extends QueryableGlobalRuleRALStatement {
+public final class ShowTrafficRulesStatement extends QueryableRALStatement {
     
     private final String ruleName;
 }
diff --git a/kernel/transaction/distsql/statement/src/main/java/org/apache/shardingsphere/transaction/distsql/parser/statement/queryable/ShowTransactionRuleStatement.java b/kernel/transaction/distsql/statement/src/main/java/org/apache/shardingsphere/transaction/distsql/parser/statement/queryable/ShowTransactionRuleStatement.java
index fb0a4e55f19..3de050e50fa 100644
--- a/kernel/transaction/distsql/statement/src/main/java/org/apache/shardingsphere/transaction/distsql/parser/statement/queryable/ShowTransactionRuleStatement.java
+++ b/kernel/transaction/distsql/statement/src/main/java/org/apache/shardingsphere/transaction/distsql/parser/statement/queryable/ShowTransactionRuleStatement.java
@@ -17,10 +17,10 @@
 
 package org.apache.shardingsphere.transaction.distsql.parser.statement.queryable;
 
-import org.apache.shardingsphere.distsql.parser.statement.ral.QueryableGlobalRuleRALStatement;
+import org.apache.shardingsphere.distsql.parser.statement.ral.QueryableRALStatement;
 
 /**
  * Show transaction rule statement.
  */
-public final class ShowTransactionRuleStatement extends QueryableGlobalRuleRALStatement {
+public final class ShowTransactionRuleStatement extends QueryableRALStatement {
 }