This is an automated email from the ASF dual-hosted git repository.
yx9o 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 1d727c6b910 Refactor ShowShadowAlgorithmPluginsResultRowBuilder &
ShowMaskAlgorithmPluginsResultRowBuilder (#30079)
1d727c6b910 is described below
commit 1d727c6b910830b2c2a63782c802ae2a8f666269
Author: Raigor <[email protected]>
AuthorDate: Thu Feb 8 23:51:48 2024 +0800
Refactor ShowShadowAlgorithmPluginsResultRowBuilder &
ShowMaskAlgorithmPluginsResultRowBuilder (#30079)
* Refactor ShowShadowAlgorithmPluginsResultRowBuilder
* Refactor ShowMaskAlgorithmPluginsResultRowBuilder
---
.../ShowMaskAlgorithmImplementationsExecutor.java | 52 ----------------------
.../ShowMaskAlgorithmPluginsResultRowBuilder.java | 49 ++++++++++++++++++++
...stsql.handler.engine.query.DistSQLQueryExecutor | 1 -
...xecutor.ral.plugin.ShowPluginsResultRowBuilder} | 3 +-
.../parser/core/MaskDistSQLStatementVisitor.java | 4 +-
.../ShowMaskAlgorithmImplementationsStatement.java | 26 -----------
...ShowShadowAlgorithmImplementationsExecutor.java | 51 ---------------------
...ShowShadowAlgorithmPluginsResultRowBuilder.java | 49 ++++++++++++++++++++
...stsql.handler.engine.query.DistSQLQueryExecutor | 1 -
...xecutor.ral.plugin.ShowPluginsResultRowBuilder} | 3 +-
.../parser/core/ShadowDistSQLStatementVisitor.java | 4 +-
...howShadowAlgorithmImplementationsStatement.java | 26 -----------
12 files changed, 104 insertions(+), 165 deletions(-)
diff --git
a/features/mask/distsql/handler/src/main/java/org/apache/shardingsphere/mask/distsql/handler/query/ShowMaskAlgorithmImplementationsExecutor.java
b/features/mask/distsql/handler/src/main/java/org/apache/shardingsphere/mask/distsql/handler/query/ShowMaskAlgorithmImplementationsExecutor.java
deleted file mode 100644
index 6e5cc1f74f2..00000000000
---
a/features/mask/distsql/handler/src/main/java/org/apache/shardingsphere/mask/distsql/handler/query/ShowMaskAlgorithmImplementationsExecutor.java
+++ /dev/null
@@ -1,52 +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.mask.distsql.handler.query;
-
-import
org.apache.shardingsphere.distsql.handler.engine.query.DistSQLQueryExecutor;
-import
org.apache.shardingsphere.infra.merge.result.impl.local.LocalDataQueryResultRow;
-import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
-import
org.apache.shardingsphere.mask.distsql.statement.ShowMaskAlgorithmImplementationsStatement;
-import org.apache.shardingsphere.mask.spi.MaskAlgorithm;
-import org.apache.shardingsphere.mode.manager.ContextManager;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.stream.Collectors;
-
-/**
- * Show mask algorithm implementations executor.
- */
-public final class ShowMaskAlgorithmImplementationsExecutor implements
DistSQLQueryExecutor<ShowMaskAlgorithmImplementationsStatement> {
-
- @Override
- public Collection<String> getColumnNames() {
- return Arrays.asList("name", "type", "class_path");
- }
-
- @SuppressWarnings("rawtypes")
- @Override
- public Collection<LocalDataQueryResultRow> getRows(final
ShowMaskAlgorithmImplementationsStatement sqlStatement, final ContextManager
contextManager) {
- Collection<MaskAlgorithm> maskAlgorithms =
ShardingSphereServiceLoader.getServiceInstances(MaskAlgorithm.class);
- return maskAlgorithms.stream().map(each -> new
LocalDataQueryResultRow(each.getClass().getSimpleName(), each.getType(),
each.getClass().getName())).collect(Collectors.toList());
- }
-
- @Override
- public Class<ShowMaskAlgorithmImplementationsStatement> getType() {
- return ShowMaskAlgorithmImplementationsStatement.class;
- }
-}
diff --git
a/features/mask/distsql/handler/src/main/java/org/apache/shardingsphere/mask/distsql/handler/query/ShowMaskAlgorithmPluginsResultRowBuilder.java
b/features/mask/distsql/handler/src/main/java/org/apache/shardingsphere/mask/distsql/handler/query/ShowMaskAlgorithmPluginsResultRowBuilder.java
new file mode 100644
index 00000000000..cf70add495b
--- /dev/null
+++
b/features/mask/distsql/handler/src/main/java/org/apache/shardingsphere/mask/distsql/handler/query/ShowMaskAlgorithmPluginsResultRowBuilder.java
@@ -0,0 +1,49 @@
+/*
+ * 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.mask.distsql.handler.query;
+
+import
org.apache.shardingsphere.distsql.handler.engine.query.ral.plugin.PluginMetaDataQueryResultRows;
+import
org.apache.shardingsphere.distsql.handler.executor.ral.plugin.ShowPluginsResultRowBuilder;
+import
org.apache.shardingsphere.distsql.statement.ral.queryable.show.ShowPluginsStatement;
+import
org.apache.shardingsphere.infra.merge.result.impl.local.LocalDataQueryResultRow;
+import org.apache.shardingsphere.mask.spi.MaskAlgorithm;
+
+import java.util.Collection;
+
+/**
+ * Show mask algorithm plugins result row builder.
+ */
+public final class ShowMaskAlgorithmPluginsResultRowBuilder implements
ShowPluginsResultRowBuilder {
+
+ private final PluginMetaDataQueryResultRows pluginMetaDataQueryResultRows
= new PluginMetaDataQueryResultRows(MaskAlgorithm.class);
+
+ @Override
+ public Collection<LocalDataQueryResultRow> generateRows(final
ShowPluginsStatement sqlStatement) {
+ return pluginMetaDataQueryResultRows.getRows();
+ }
+
+ @Override
+ public Collection<String> getColumnNames() {
+ return pluginMetaDataQueryResultRows.getColumnNames();
+ }
+
+ @Override
+ public String getType() {
+ return "MASK_ALGORITHM";
+ }
+}
diff --git
a/features/mask/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.query.DistSQLQueryExecutor
b/features/mask/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.query.DistSQLQueryExecutor
index e0d50e5893d..91d46e793cb 100644
---
a/features/mask/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.query.DistSQLQueryExecutor
+++
b/features/mask/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.query.DistSQLQueryExecutor
@@ -16,4 +16,3 @@
#
org.apache.shardingsphere.mask.distsql.handler.query.ShowMaskRuleExecutor
-org.apache.shardingsphere.mask.distsql.handler.query.ShowMaskAlgorithmImplementationsExecutor
diff --git
a/features/mask/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.query.DistSQLQueryExecutor
b/features/mask/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.executor.ral.plugin.ShowPluginsResultRowBuilder
similarity index 89%
copy from
features/mask/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.query.DistSQLQueryExecutor
copy to
features/mask/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.executor.ral.plugin.ShowPluginsResultRowBuilder
index e0d50e5893d..8335918e02a 100644
---
a/features/mask/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.query.DistSQLQueryExecutor
+++
b/features/mask/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.executor.ral.plugin.ShowPluginsResultRowBuilder
@@ -15,5 +15,4 @@
# limitations under the License.
#
-org.apache.shardingsphere.mask.distsql.handler.query.ShowMaskRuleExecutor
-org.apache.shardingsphere.mask.distsql.handler.query.ShowMaskAlgorithmImplementationsExecutor
+org.apache.shardingsphere.mask.distsql.handler.query.ShowMaskAlgorithmPluginsResultRowBuilder
diff --git
a/features/mask/distsql/parser/src/main/java/org/apache/shardingsphere/mask/distsql/parser/core/MaskDistSQLStatementVisitor.java
b/features/mask/distsql/parser/src/main/java/org/apache/shardingsphere/mask/distsql/parser/core/MaskDistSQLStatementVisitor.java
index 367aa83d49d..f3523cf4424 100644
---
a/features/mask/distsql/parser/src/main/java/org/apache/shardingsphere/mask/distsql/parser/core/MaskDistSQLStatementVisitor.java
+++
b/features/mask/distsql/parser/src/main/java/org/apache/shardingsphere/mask/distsql/parser/core/MaskDistSQLStatementVisitor.java
@@ -32,13 +32,13 @@ import
org.apache.shardingsphere.distsql.parser.autogen.MaskDistSQLStatementPars
import
org.apache.shardingsphere.distsql.parser.autogen.MaskDistSQLStatementParser.ShowMaskAlgorithmImplementationsContext;
import
org.apache.shardingsphere.distsql.parser.autogen.MaskDistSQLStatementParser.ShowMaskRulesContext;
import org.apache.shardingsphere.distsql.segment.AlgorithmSegment;
+import
org.apache.shardingsphere.distsql.statement.ral.queryable.show.ShowPluginsStatement;
import
org.apache.shardingsphere.distsql.statement.rql.rule.database.CountRuleStatement;
import org.apache.shardingsphere.mask.distsql.segment.MaskColumnSegment;
import org.apache.shardingsphere.mask.distsql.segment.MaskRuleSegment;
import org.apache.shardingsphere.mask.distsql.statement.AlterMaskRuleStatement;
import
org.apache.shardingsphere.mask.distsql.statement.CreateMaskRuleStatement;
import org.apache.shardingsphere.mask.distsql.statement.DropMaskRuleStatement;
-import
org.apache.shardingsphere.mask.distsql.statement.ShowMaskAlgorithmImplementationsStatement;
import org.apache.shardingsphere.mask.distsql.statement.ShowMaskRulesStatement;
import org.apache.shardingsphere.sql.parser.api.ASTNode;
import org.apache.shardingsphere.sql.parser.api.visitor.SQLVisitor;
@@ -116,6 +116,6 @@ public final class MaskDistSQLStatementVisitor extends
MaskDistSQLStatementBaseV
@Override
public ASTNode visitShowMaskAlgorithmImplementations(final
ShowMaskAlgorithmImplementationsContext ctx) {
- return new ShowMaskAlgorithmImplementationsStatement();
+ return new ShowPluginsStatement("MASK_ALGORITHM");
}
}
diff --git
a/features/mask/distsql/statement/src/main/java/org/apache/shardingsphere/mask/distsql/statement/ShowMaskAlgorithmImplementationsStatement.java
b/features/mask/distsql/statement/src/main/java/org/apache/shardingsphere/mask/distsql/statement/ShowMaskAlgorithmImplementationsStatement.java
deleted file mode 100644
index 6eb08bf37ba..00000000000
---
a/features/mask/distsql/statement/src/main/java/org/apache/shardingsphere/mask/distsql/statement/ShowMaskAlgorithmImplementationsStatement.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.mask.distsql.statement;
-
-import
org.apache.shardingsphere.distsql.statement.ral.queryable.QueryableRALStatement;
-
-/**
- * Show mask algorithm implementations statement.
- */
-public final class ShowMaskAlgorithmImplementationsStatement extends
QueryableRALStatement {
-}
diff --git
a/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/query/ShowShadowAlgorithmImplementationsExecutor.java
b/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/query/ShowShadowAlgorithmImplementationsExecutor.java
deleted file mode 100644
index f3808ad8858..00000000000
---
a/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/query/ShowShadowAlgorithmImplementationsExecutor.java
+++ /dev/null
@@ -1,51 +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.shadow.distsql.handler.query;
-
-import
org.apache.shardingsphere.distsql.handler.engine.query.DistSQLQueryExecutor;
-import
org.apache.shardingsphere.infra.merge.result.impl.local.LocalDataQueryResultRow;
-import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
-import org.apache.shardingsphere.mode.manager.ContextManager;
-import
org.apache.shardingsphere.shadow.distsql.statement.ShowShadowAlgorithmImplementationsStatement;
-import org.apache.shardingsphere.shadow.spi.ShadowAlgorithm;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.stream.Collectors;
-
-/**
- * Show shadow algorithm implementations executor.
- */
-public final class ShowShadowAlgorithmImplementationsExecutor implements
DistSQLQueryExecutor<ShowShadowAlgorithmImplementationsStatement> {
-
- @Override
- public Collection<String> getColumnNames() {
- return Arrays.asList("name", "type", "class_path");
- }
-
- @Override
- public Collection<LocalDataQueryResultRow> getRows(final
ShowShadowAlgorithmImplementationsStatement sqlStatement, final ContextManager
contextManager) {
- Collection<ShadowAlgorithm> shadowAlgorithms =
ShardingSphereServiceLoader.getServiceInstances(ShadowAlgorithm.class);
- return shadowAlgorithms.stream().map(each -> new
LocalDataQueryResultRow(each.getClass().getSimpleName(), each.getType(),
each.getClass().getName())).collect(Collectors.toList());
- }
-
- @Override
- public Class<ShowShadowAlgorithmImplementationsStatement> getType() {
- return ShowShadowAlgorithmImplementationsStatement.class;
- }
-}
diff --git
a/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/query/ShowShadowAlgorithmPluginsResultRowBuilder.java
b/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/query/ShowShadowAlgorithmPluginsResultRowBuilder.java
new file mode 100644
index 00000000000..b87e7d1683e
--- /dev/null
+++
b/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/query/ShowShadowAlgorithmPluginsResultRowBuilder.java
@@ -0,0 +1,49 @@
+/*
+ * 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.shadow.distsql.handler.query;
+
+import
org.apache.shardingsphere.distsql.handler.engine.query.ral.plugin.PluginMetaDataQueryResultRows;
+import
org.apache.shardingsphere.distsql.handler.executor.ral.plugin.ShowPluginsResultRowBuilder;
+import
org.apache.shardingsphere.distsql.statement.ral.queryable.show.ShowPluginsStatement;
+import
org.apache.shardingsphere.infra.merge.result.impl.local.LocalDataQueryResultRow;
+import org.apache.shardingsphere.shadow.spi.ShadowAlgorithm;
+
+import java.util.Collection;
+
+/**
+ * Show shadow algorithm plugins result row builder.
+ */
+public final class ShowShadowAlgorithmPluginsResultRowBuilder implements
ShowPluginsResultRowBuilder {
+
+ private final PluginMetaDataQueryResultRows pluginMetaDataQueryResultRows
= new PluginMetaDataQueryResultRows(ShadowAlgorithm.class);
+
+ @Override
+ public Collection<LocalDataQueryResultRow> generateRows(final
ShowPluginsStatement sqlStatement) {
+ return pluginMetaDataQueryResultRows.getRows();
+ }
+
+ @Override
+ public Collection<String> getColumnNames() {
+ return pluginMetaDataQueryResultRows.getColumnNames();
+ }
+
+ @Override
+ public String getType() {
+ return "SHADOW_ALGORITHM";
+ }
+}
diff --git
a/features/shadow/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.query.DistSQLQueryExecutor
b/features/shadow/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.query.DistSQLQueryExecutor
index f58cddf629e..931d5eb50f6 100644
---
a/features/shadow/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.query.DistSQLQueryExecutor
+++
b/features/shadow/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.query.DistSQLQueryExecutor
@@ -19,4 +19,3 @@
org.apache.shardingsphere.shadow.distsql.handler.query.ShowShadowRuleExecutor
org.apache.shardingsphere.shadow.distsql.handler.query.ShowShadowTableRulesExecutor
org.apache.shardingsphere.shadow.distsql.handler.query.ShowShadowAlgorithmsExecutor
org.apache.shardingsphere.shadow.distsql.handler.query.ShowDefaultShadowAlgorithmExecutor
-org.apache.shardingsphere.shadow.distsql.handler.query.ShowShadowAlgorithmImplementationsExecutor
diff --git
a/features/mask/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.query.DistSQLQueryExecutor
b/features/shadow/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.executor.ral.plugin.ShowPluginsResultRowBuilder
similarity index 82%
copy from
features/mask/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.query.DistSQLQueryExecutor
copy to
features/shadow/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.executor.ral.plugin.ShowPluginsResultRowBuilder
index e0d50e5893d..69f00f14114 100644
---
a/features/mask/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.query.DistSQLQueryExecutor
+++
b/features/shadow/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.executor.ral.plugin.ShowPluginsResultRowBuilder
@@ -15,5 +15,4 @@
# limitations under the License.
#
-org.apache.shardingsphere.mask.distsql.handler.query.ShowMaskRuleExecutor
-org.apache.shardingsphere.mask.distsql.handler.query.ShowMaskAlgorithmImplementationsExecutor
+org.apache.shardingsphere.shadow.distsql.handler.query.ShowShadowAlgorithmPluginsResultRowBuilder
diff --git
a/features/shadow/distsql/parser/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/core/ShadowDistSQLStatementVisitor.java
b/features/shadow/distsql/parser/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/core/ShadowDistSQLStatementVisitor.java
index 912c104c525..f4446f1a5c3 100644
---
a/features/shadow/distsql/parser/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/core/ShadowDistSQLStatementVisitor.java
+++
b/features/shadow/distsql/parser/src/main/java/org/apache/shardingsphere/shadow/distsql/parser/core/ShadowDistSQLStatementVisitor.java
@@ -38,6 +38,7 @@ import
org.apache.shardingsphere.distsql.parser.autogen.ShadowDistSQLStatementPa
import
org.apache.shardingsphere.distsql.parser.autogen.ShadowDistSQLStatementParser.ShowShadowRulesContext;
import
org.apache.shardingsphere.distsql.parser.autogen.ShadowDistSQLStatementParser.ShowShadowTableRulesContext;
import org.apache.shardingsphere.distsql.segment.AlgorithmSegment;
+import
org.apache.shardingsphere.distsql.statement.ral.queryable.show.ShowPluginsStatement;
import
org.apache.shardingsphere.distsql.statement.rql.rule.database.CountRuleStatement;
import org.apache.shardingsphere.shadow.distsql.segment.ShadowAlgorithmSegment;
import org.apache.shardingsphere.shadow.distsql.segment.ShadowRuleSegment;
@@ -49,7 +50,6 @@ import
org.apache.shardingsphere.shadow.distsql.statement.DropDefaultShadowAlgor
import
org.apache.shardingsphere.shadow.distsql.statement.DropShadowAlgorithmStatement;
import
org.apache.shardingsphere.shadow.distsql.statement.DropShadowRuleStatement;
import
org.apache.shardingsphere.shadow.distsql.statement.ShowDefaultShadowAlgorithmStatement;
-import
org.apache.shardingsphere.shadow.distsql.statement.ShowShadowAlgorithmImplementationsStatement;
import
org.apache.shardingsphere.shadow.distsql.statement.ShowShadowAlgorithmsStatement;
import
org.apache.shardingsphere.shadow.distsql.statement.ShowShadowRulesStatement;
import
org.apache.shardingsphere.shadow.distsql.statement.ShowShadowTableRulesStatement;
@@ -206,6 +206,6 @@ public final class ShadowDistSQLStatementVisitor extends
ShadowDistSQLStatementB
@Override
public ASTNode visitShowShadowAlgorithmImplementations(final
ShowShadowAlgorithmImplementationsContext ctx) {
- return new ShowShadowAlgorithmImplementationsStatement();
+ return new ShowPluginsStatement("SHADOW_ALGORITHM");
}
}
diff --git
a/features/shadow/distsql/statement/src/main/java/org/apache/shardingsphere/shadow/distsql/statement/ShowShadowAlgorithmImplementationsStatement.java
b/features/shadow/distsql/statement/src/main/java/org/apache/shardingsphere/shadow/distsql/statement/ShowShadowAlgorithmImplementationsStatement.java
deleted file mode 100644
index 776dff64fe9..00000000000
---
a/features/shadow/distsql/statement/src/main/java/org/apache/shardingsphere/shadow/distsql/statement/ShowShadowAlgorithmImplementationsStatement.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.shadow.distsql.statement;
-
-import
org.apache.shardingsphere.distsql.statement.ral.queryable.QueryableRALStatement;
-
-/**
- * Show shadow algorithm implementations statement.
- */
-public final class ShowShadowAlgorithmImplementationsStatement extends
QueryableRALStatement {
-}