This is an automated email from the ASF dual-hosted git repository.
zhaojinchao 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 ef0c611620b Remove unused method (#30632)
ef0c611620b is described below
commit ef0c611620b65883ab4875848c3634367372de7d
Author: ChenJiaHao <[email protected]>
AuthorDate: Mon Mar 25 13:29:37 2024 +0800
Remove unused method (#30632)
---
.../handler/update/AlterEncryptRuleExecutor.java | 37 +++-------------------
.../handler/update/DropEncryptRuleExecutor.java | 4 ---
.../handler/update/AlterMaskRuleExecutor.java | 17 ----------
.../handler/update/DropMaskRuleExecutor.java | 4 ---
.../AlterReadwriteSplittingRuleExecutor.java | 19 +----------
.../update/DropReadwriteSplittingRuleExecutor.java | 4 ---
.../handler/update/CreateShadowRuleExecutor.java | 8 +----
.../handler/update/DropShadowRuleExecutor.java | 4 ---
.../AlterShardingTableReferenceRuleExecutor.java | 4 ---
.../update/DropShardingAlgorithmExecutor.java | 4 ---
.../update/DropShardingTableRuleExecutor.java | 8 -----
.../data/loader/DialectMetaDataLoader.java | 15 ---------
12 files changed, 6 insertions(+), 122 deletions(-)
diff --git
a/features/encrypt/distsql/handler/src/main/java/org/apache/shardingsphere/encrypt/distsql/handler/update/AlterEncryptRuleExecutor.java
b/features/encrypt/distsql/handler/src/main/java/org/apache/shardingsphere/encrypt/distsql/handler/update/AlterEncryptRuleExecutor.java
index 50f17520e9e..9299c916713 100644
---
a/features/encrypt/distsql/handler/src/main/java/org/apache/shardingsphere/encrypt/distsql/handler/update/AlterEncryptRuleExecutor.java
+++
b/features/encrypt/distsql/handler/src/main/java/org/apache/shardingsphere/encrypt/distsql/handler/update/AlterEncryptRuleExecutor.java
@@ -17,15 +17,11 @@
package org.apache.shardingsphere.encrypt.distsql.handler.update;
-import com.google.common.base.Preconditions;
import lombok.Setter;
-import
org.apache.shardingsphere.infra.exception.rule.InvalidRuleConfigurationException;
-import
org.apache.shardingsphere.infra.exception.rule.MissingRequiredRuleException;
-import
org.apache.shardingsphere.distsql.handler.required.DistSQLExecutorCurrentRuleRequired;
import
org.apache.shardingsphere.distsql.handler.engine.update.rdl.rule.spi.database.DatabaseRuleAlterExecutor;
+import
org.apache.shardingsphere.distsql.handler.required.DistSQLExecutorCurrentRuleRequired;
import org.apache.shardingsphere.distsql.segment.AlgorithmSegment;
import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration;
-import
org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnItemRuleConfiguration;
import
org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration;
import
org.apache.shardingsphere.encrypt.distsql.handler.converter.EncryptRuleStatementConverter;
import org.apache.shardingsphere.encrypt.distsql.segment.EncryptRuleSegment;
@@ -33,8 +29,10 @@ import
org.apache.shardingsphere.encrypt.distsql.statement.AlterEncryptRuleState
import org.apache.shardingsphere.encrypt.rule.EncryptRule;
import org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm;
import
org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfiguration;
-import
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import
org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions;
+import
org.apache.shardingsphere.infra.exception.rule.InvalidRuleConfigurationException;
+import
org.apache.shardingsphere.infra.exception.rule.MissingRequiredRuleException;
+import
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
import java.util.Collection;
@@ -43,7 +41,6 @@ import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Objects;
-import java.util.Optional;
import java.util.stream.Collectors;
/**
@@ -115,32 +112,6 @@ public final class AlterEncryptRuleExecutor implements
DatabaseRuleAlterExecutor
return new EncryptRuleConfiguration(Collections.emptyList(),
toBeDroppedEncryptors);
}
- private void dropRuleConfiguration(final EncryptRuleConfiguration
currentRuleConfig, final EncryptRuleConfiguration toBeAlteredRuleConfig) {
- for (EncryptTableRuleConfiguration each :
toBeAlteredRuleConfig.getTables()) {
- Optional<EncryptTableRuleConfiguration> toBeRemovedTableRuleConfig
= currentRuleConfig.getTables().stream().filter(tableRule ->
tableRule.getName().equals(each.getName())).findAny();
- Preconditions.checkState(toBeRemovedTableRuleConfig.isPresent());
-
currentRuleConfig.getTables().remove(toBeRemovedTableRuleConfig.get());
- }
- }
-
- private void addRuleConfiguration(final EncryptRuleConfiguration
currentRuleConfig, final EncryptRuleConfiguration toBeAlteredRuleConfig) {
-
currentRuleConfig.getTables().addAll(toBeAlteredRuleConfig.getTables());
-
currentRuleConfig.getEncryptors().putAll(toBeAlteredRuleConfig.getEncryptors());
- }
-
- private void dropUnusedEncryptor(final EncryptRuleConfiguration
currentRuleConfig) {
- Collection<String> inUsedEncryptors =
currentRuleConfig.getTables().stream().flatMap(each ->
each.getColumns().stream()).map(optional ->
optional.getCipher().getEncryptorName())
- .collect(Collectors.toSet());
-
inUsedEncryptors.addAll(currentRuleConfig.getTables().stream().flatMap(each ->
each.getColumns().stream())
- .map(optional ->
optional.getAssistedQuery().map(EncryptColumnItemRuleConfiguration::getEncryptorName).orElse(""))
- .collect(Collectors.toSet()));
-
inUsedEncryptors.addAll(currentRuleConfig.getTables().stream().flatMap(each ->
each.getColumns().stream())
- .map(optional ->
optional.getLikeQuery().map(EncryptColumnItemRuleConfiguration::getEncryptorName).orElse(""))
- .collect(Collectors.toSet()));
- Collection<String> unusedEncryptors =
currentRuleConfig.getEncryptors().keySet().stream().filter(each ->
!inUsedEncryptors.contains(each)).collect(Collectors.toSet());
- unusedEncryptors.forEach(each ->
currentRuleConfig.getEncryptors().remove(each));
- }
-
@Override
public Class<EncryptRule> getRuleClass() {
return EncryptRule.class;
diff --git
a/features/encrypt/distsql/handler/src/main/java/org/apache/shardingsphere/encrypt/distsql/handler/update/DropEncryptRuleExecutor.java
b/features/encrypt/distsql/handler/src/main/java/org/apache/shardingsphere/encrypt/distsql/handler/update/DropEncryptRuleExecutor.java
index 9f5c22306be..b3d3fcdf0c1 100644
---
a/features/encrypt/distsql/handler/src/main/java/org/apache/shardingsphere/encrypt/distsql/handler/update/DropEncryptRuleExecutor.java
+++
b/features/encrypt/distsql/handler/src/main/java/org/apache/shardingsphere/encrypt/distsql/handler/update/DropEncryptRuleExecutor.java
@@ -85,10 +85,6 @@ public final class DropEncryptRuleExecutor implements
DatabaseRuleDropExecutor<D
encryptTableRuleConfig.ifPresent(optional ->
rule.getConfiguration().getTables().remove(encryptTableRuleConfig.get()));
}
- private void dropUnusedEncryptor(final EncryptRuleConfiguration
currentRuleConfig) {
-
UnusedAlgorithmFinder.findUnusedEncryptor(currentRuleConfig).forEach(each ->
currentRuleConfig.getEncryptors().remove(each));
- }
-
@Override
public Class<EncryptRule> getRuleClass() {
return EncryptRule.class;
diff --git
a/features/mask/distsql/handler/src/main/java/org/apache/shardingsphere/mask/distsql/handler/update/AlterMaskRuleExecutor.java
b/features/mask/distsql/handler/src/main/java/org/apache/shardingsphere/mask/distsql/handler/update/AlterMaskRuleExecutor.java
index 634584b6429..b9fad66f781 100644
---
a/features/mask/distsql/handler/src/main/java/org/apache/shardingsphere/mask/distsql/handler/update/AlterMaskRuleExecutor.java
+++
b/features/mask/distsql/handler/src/main/java/org/apache/shardingsphere/mask/distsql/handler/update/AlterMaskRuleExecutor.java
@@ -85,23 +85,6 @@ public final class AlterMaskRuleExecutor implements
DatabaseRuleAlterExecutor<Al
return new MaskRuleConfiguration(Collections.emptyList(),
toBeDroppedAlgorithms);
}
- private void dropRuleConfiguration(final MaskRuleConfiguration
currentRuleConfig, final MaskRuleConfiguration toBeAlteredRuleConfig) {
- Collection<String> toBeAlteredRuleName =
toBeAlteredRuleConfig.getTables().stream().map(MaskTableRuleConfiguration::getName).collect(Collectors.toList());
- currentRuleConfig.getTables().removeIf(each ->
toBeAlteredRuleName.contains(each.getName()));
- }
-
- private void addRuleConfiguration(final MaskRuleConfiguration
currentRuleConfig, final MaskRuleConfiguration toBeAlteredRuleConfig) {
-
currentRuleConfig.getTables().addAll(toBeAlteredRuleConfig.getTables());
-
currentRuleConfig.getMaskAlgorithms().putAll(toBeAlteredRuleConfig.getMaskAlgorithms());
- }
-
- private void dropUnusedAlgorithms(final MaskRuleConfiguration
currentRuleConfig) {
- Collection<String> inUsedAlgorithms =
currentRuleConfig.getTables().stream().flatMap(each ->
each.getColumns().stream()).map(MaskColumnRuleConfiguration::getMaskAlgorithm)
- .collect(Collectors.toSet());
- Collection<String> unusedAlgorithms =
currentRuleConfig.getMaskAlgorithms().keySet().stream().filter(each ->
!inUsedAlgorithms.contains(each)).collect(Collectors.toSet());
- unusedAlgorithms.forEach(each ->
currentRuleConfig.getMaskAlgorithms().remove(each));
- }
-
@Override
public Class<MaskRule> getRuleClass() {
return MaskRule.class;
diff --git
a/features/mask/distsql/handler/src/main/java/org/apache/shardingsphere/mask/distsql/handler/update/DropMaskRuleExecutor.java
b/features/mask/distsql/handler/src/main/java/org/apache/shardingsphere/mask/distsql/handler/update/DropMaskRuleExecutor.java
index fcae24aa47e..99fe92166d6 100644
---
a/features/mask/distsql/handler/src/main/java/org/apache/shardingsphere/mask/distsql/handler/update/DropMaskRuleExecutor.java
+++
b/features/mask/distsql/handler/src/main/java/org/apache/shardingsphere/mask/distsql/handler/update/DropMaskRuleExecutor.java
@@ -84,10 +84,6 @@ public final class DropMaskRuleExecutor implements
DatabaseRuleDropExecutor<Drop
maskTableRuleConfig.ifPresent(optional ->
rule.getConfiguration().getTables().remove(maskTableRuleConfig.get()));
}
- private void dropUnusedAlgorithm(final MaskRuleConfiguration
currentRuleConfig) {
- findUnusedAlgorithms(currentRuleConfig).forEach(each ->
currentRuleConfig.getMaskAlgorithms().remove(each));
- }
-
private Collection<String> findUnusedAlgorithms(final
MaskRuleConfiguration currentRuleConfig) {
Collection<String> inUsedAlgorithms =
currentRuleConfig.getTables().stream().flatMap(each ->
each.getColumns().stream()).map(MaskColumnRuleConfiguration::getMaskAlgorithm)
.collect(Collectors.toSet());
diff --git
a/features/readwrite-splitting/distsql/handler/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/handler/update/AlterReadwriteSplittingRuleExecutor.java
b/features/readwrite-splitting/distsql/handler/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/handler/update/AlterReadwriteSplittingRuleExecutor.java
index 5bbc186b377..8a2bcafd320 100644
---
a/features/readwrite-splitting/distsql/handler/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/handler/update/AlterReadwriteSplittingRuleExecutor.java
+++
b/features/readwrite-splitting/distsql/handler/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/handler/update/AlterReadwriteSplittingRuleExecutor.java
@@ -17,10 +17,9 @@
package org.apache.shardingsphere.readwritesplitting.distsql.handler.update;
-import com.google.common.base.Preconditions;
import lombok.Setter;
-import
org.apache.shardingsphere.distsql.handler.required.DistSQLExecutorCurrentRuleRequired;
import
org.apache.shardingsphere.distsql.handler.engine.update.rdl.rule.spi.database.DatabaseRuleAlterExecutor;
+import
org.apache.shardingsphere.distsql.handler.required.DistSQLExecutorCurrentRuleRequired;
import
org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfiguration;
import
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import
org.apache.shardingsphere.readwritesplitting.api.ReadwriteSplittingRuleConfiguration;
@@ -35,7 +34,6 @@ import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-import java.util.Optional;
import java.util.stream.Collectors;
/**
@@ -73,21 +71,6 @@ public final class AlterReadwriteSplittingRuleExecutor
implements DatabaseRuleAl
return new ReadwriteSplittingRuleConfiguration(dataSources,
loadBalancers);
}
- private void dropRuleConfiguration(final
ReadwriteSplittingRuleConfiguration currentRuleConfig, final
ReadwriteSplittingRuleConfiguration toBeAlteredRuleConfig) {
- for (ReadwriteSplittingDataSourceRuleConfiguration each :
toBeAlteredRuleConfig.getDataSources()) {
- Optional<ReadwriteSplittingDataSourceRuleConfiguration>
toBeRemovedDataSourceRuleConfig =
-
currentRuleConfig.getDataSources().stream().filter(dataSource ->
each.getName().equals(dataSource.getName())).findAny();
-
Preconditions.checkState(toBeRemovedDataSourceRuleConfig.isPresent());
-
currentRuleConfig.getDataSources().remove(toBeRemovedDataSourceRuleConfig.get());
-
currentRuleConfig.getLoadBalancers().remove(toBeRemovedDataSourceRuleConfig.get().getLoadBalancerName());
- }
- }
-
- private void addRuleConfiguration(final
ReadwriteSplittingRuleConfiguration currentRuleConfig, final
ReadwriteSplittingRuleConfiguration toBeAlteredRuleConfig) {
-
currentRuleConfig.getDataSources().addAll(toBeAlteredRuleConfig.getDataSources());
-
currentRuleConfig.getLoadBalancers().putAll(toBeAlteredRuleConfig.getLoadBalancers());
- }
-
@Override
public Class<ReadwriteSplittingRule> getRuleClass() {
return ReadwriteSplittingRule.class;
diff --git
a/features/readwrite-splitting/distsql/handler/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/handler/update/DropReadwriteSplittingRuleExecutor.java
b/features/readwrite-splitting/distsql/handler/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/handler/update/DropReadwriteSplittingRuleExecutor.java
index 830b88dc690..53b59165dfc 100644
---
a/features/readwrite-splitting/distsql/handler/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/handler/update/DropReadwriteSplittingRuleExecutor.java
+++
b/features/readwrite-splitting/distsql/handler/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/handler/update/DropReadwriteSplittingRuleExecutor.java
@@ -120,10 +120,6 @@ public final class DropReadwriteSplittingRuleExecutor
implements DatabaseRuleDro
dataSourceRuleConfig.ifPresent(optional ->
rule.getConfiguration().getDataSources().remove(optional));
}
- private void dropUnusedLoadBalancer(final
ReadwriteSplittingRuleConfiguration currentRuleConfig) {
- findUnusedLoadBalancers().forEach(each ->
currentRuleConfig.getLoadBalancers().remove(each));
- }
-
private Collection<String> findUnusedLoadBalancers() {
Collection<String> inUsedAlgorithms =
rule.getConfiguration().getDataSources().stream().map(ReadwriteSplittingDataSourceRuleConfiguration::getLoadBalancerName).collect(Collectors.toSet());
return
rule.getConfiguration().getLoadBalancers().keySet().stream().filter(each ->
!inUsedAlgorithms.contains(each)).collect(Collectors.toSet());
diff --git
a/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/CreateShadowRuleExecutor.java
b/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/CreateShadowRuleExecutor.java
index cf43143cedd..7cad0592d47 100644
---
a/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/CreateShadowRuleExecutor.java
+++
b/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/CreateShadowRuleExecutor.java
@@ -18,13 +18,12 @@
package org.apache.shardingsphere.shadow.distsql.handler.update;
import lombok.Setter;
-import org.apache.shardingsphere.infra.exception.rule.DuplicateRuleException;
import
org.apache.shardingsphere.distsql.handler.engine.update.rdl.rule.spi.database.DatabaseRuleCreateExecutor;
import
org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions;
+import org.apache.shardingsphere.infra.exception.rule.DuplicateRuleException;
import
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
import org.apache.shardingsphere.shadow.api.config.ShadowRuleConfiguration;
-import
org.apache.shardingsphere.shadow.api.config.table.ShadowTableConfiguration;
import
org.apache.shardingsphere.shadow.distsql.handler.checker.ShadowRuleStatementChecker;
import
org.apache.shardingsphere.shadow.distsql.handler.converter.ShadowRuleStatementConverter;
import
org.apache.shardingsphere.shadow.distsql.handler.supporter.ShadowRuleStatementSupporter;
@@ -35,7 +34,6 @@ import org.apache.shardingsphere.shadow.rule.ShadowRule;
import org.apache.shardingsphere.shadow.spi.ShadowAlgorithm;
import java.util.Collection;
-import java.util.Map;
/**
* Create shadow rule executor.
@@ -89,10 +87,6 @@ public final class CreateShadowRuleExecutor implements
DatabaseRuleCreateExecuto
return ShadowRuleStatementConverter.convert(segments);
}
- private void updateTables(final Map<String, ShadowTableConfiguration>
currentTables, final Map<String, ShadowTableConfiguration> toBeCreateTables) {
- toBeCreateTables.forEach((key, value) -> currentTables.merge(key,
value, ShadowRuleStatementSupporter::mergeConfiguration));
- }
-
@Override
public Class<ShadowRule> getRuleClass() {
return ShadowRule.class;
diff --git
a/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/DropShadowRuleExecutor.java
b/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/DropShadowRuleExecutor.java
index 24bfa0655ab..3e89e32cda5 100644
---
a/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/DropShadowRuleExecutor.java
+++
b/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/DropShadowRuleExecutor.java
@@ -110,10 +110,6 @@ public final class DropShadowRuleExecutor implements
DatabaseRuleDropExecutor<Dr
dataSourceRuleConfig.ifPresent(optional ->
rule.getConfiguration().getDataSources().remove(optional));
}
- private void dropUnusedAlgorithm(final ShadowRuleConfiguration
currentRuleConfig) {
-
UnusedAlgorithmFinder.findUnusedShadowAlgorithm(currentRuleConfig).forEach(each
-> currentRuleConfig.getShadowAlgorithms().remove(each));
- }
-
@Override
public Class<ShadowRule> getRuleClass() {
return ShadowRule.class;
diff --git
a/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingTableReferenceRuleExecutor.java
b/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingTableReferenceRuleExecutor.java
index e06980b8bce..1dd7c9f0a12 100644
---
a/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingTableReferenceRuleExecutor.java
+++
b/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingTableReferenceRuleExecutor.java
@@ -86,10 +86,6 @@ public final class AlterShardingTableReferenceRuleExecutor
implements DatabaseRu
return
sqlStatement.getRules().stream().map(TableReferenceRuleSegment::getName).collect(Collectors.toSet());
}
- private Collection<String> getToBeAlteredRuleNames(final
ShardingRuleConfiguration ruleConfig) {
- return
ruleConfig.getBindingTableGroups().stream().map(ShardingTableReferenceRuleConfiguration::getName).collect(Collectors.toSet());
- }
-
private void checkToBeReferencedShardingTablesExisted(final
AlterShardingTableReferenceRuleStatement sqlStatement) {
Collection<String> currentShardingTableNames =
getCurrentShardingTableNames();
Collection<String> notExistedTableNames =
sqlStatement.getTableNames().stream().filter(each ->
!currentShardingTableNames.contains(each)).collect(Collectors.toSet());
diff --git
a/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingAlgorithmExecutor.java
b/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingAlgorithmExecutor.java
index dd008dd94f9..2bd8f13f678 100644
---
a/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingAlgorithmExecutor.java
+++
b/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingAlgorithmExecutor.java
@@ -109,10 +109,6 @@ public final class DropShardingAlgorithmExecutor
implements DatabaseRuleDropExec
return !Collections.disjoint(getCurrentShardingAlgorithms(),
sqlStatement.getNames());
}
- private void dropShardingAlgorithm(final String algorithmName) {
-
getCurrentShardingAlgorithms().removeIf(algorithmName::equalsIgnoreCase);
- }
-
@Override
public Class<ShardingRule> getRuleClass() {
return ShardingRule.class;
diff --git
a/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingTableRuleExecutor.java
b/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingTableRuleExecutor.java
index 11e634c365a..d880c6012fb 100644
---
a/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingTableRuleExecutor.java
+++
b/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingTableRuleExecutor.java
@@ -118,14 +118,6 @@ public final class DropShardingTableRuleExecutor
implements DatabaseRuleDropExec
currentRuleConfig.getAutoTables().removeAll(currentRuleConfig.getAutoTables().stream().filter(each
->
tableName.equalsIgnoreCase(each.getLogicTable())).collect(Collectors.toList()));
}
- private void dropUnusedKeyGenerator(final ShardingRuleConfiguration
currentRuleConfig) {
-
UnusedAlgorithmFinder.findUnusedKeyGenerator(currentRuleConfig).forEach(each ->
currentRuleConfig.getKeyGenerators().remove(each));
- }
-
- private void dropUnusedAuditor(final ShardingRuleConfiguration
currentRuleConfig) {
-
UnusedAlgorithmFinder.findUnusedAuditor(currentRuleConfig).forEach(each ->
currentRuleConfig.getAuditors().remove(each));
- }
-
@Override
public Class<ShardingRule> getRuleClass() {
return ShardingRule.class;
diff --git
a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/data/loader/DialectMetaDataLoader.java
b/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/data/loader/DialectMetaDataLoader.java
index b9468548f61..7dcf98736c9 100644
---
a/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/data/loader/DialectMetaDataLoader.java
+++
b/infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/data/loader/DialectMetaDataLoader.java
@@ -17,9 +17,7 @@
package org.apache.shardingsphere.infra.database.core.metadata.data.loader;
-import com.google.common.base.Strings;
import
org.apache.shardingsphere.infra.database.core.metadata.data.model.SchemaMetaData;
-import
org.apache.shardingsphere.infra.database.core.metadata.database.enums.TableType;
import org.apache.shardingsphere.infra.database.core.spi.DatabaseTypedSPI;
import org.apache.shardingsphere.infra.spi.annotation.SingletonSPI;
@@ -40,17 +38,4 @@ public interface DialectMetaDataLoader extends
DatabaseTypedSPI {
* @throws SQLException SQL exception
*/
Collection<SchemaMetaData> load(MetaDataLoaderMaterial material) throws
SQLException;
-
- /**
- * get table type from string value.
- *
- * @param type table type string value
- * @return table type
- */
- default TableType getTableType(final String type) {
- if (Strings.isNullOrEmpty(type)) {
- return TableType.TABLE;
- }
- return type.contains("VIEW") || type.contains("view") ? TableType.VIEW
: TableType.TABLE;
- }
}