This is an automated email from the ASF dual-hosted git repository.
zhonghongsheng 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 ea7b9ff Refactor `CREATE SHARDING SCALING` to `CREATE SHARDING
SCALING RULE` (#14821)
ea7b9ff is described below
commit ea7b9ffcf5ddeb3a0bf9adebfc8e5809f9ab5529
Author: Raigor <[email protected]>
AuthorDate: Mon Jan 17 16:09:26 2022 +0800
Refactor `CREATE SHARDING SCALING` to `CREATE SHARDING SCALING RULE`
(#14821)
---
...CreateShardingScalingRuleStatementUpdater.java} | 32 ++++++-------
...isableShardingScalingRuleStatementUpdater.java} | 16 +++----
...> DropShardingScalingRuleStatementUpdater.java} | 16 +++----
...EnableShardingScalingRuleStatementUpdater.java} | 16 +++----
... => ShardingScalingRuleStatementConverter.java} | 14 +++---
...here.infra.distsql.update.RuleDefinitionUpdater | 8 ++--
...teShardingScalingRuleStatementUpdaterTest.java} | 46 +++++++++---------
...edShardingScalingRuleStatementUpdaterTest.java} | 10 ++--
...opShardingScalingRuleStatementUpdaterTest.java} | 10 ++--
...leShardingScalingRuleStatementUpdaterTest.java} | 10 ++--
.../src/main/antlr4/imports/scaling/Keyword.g4 | 4 ++
.../main/antlr4/imports/scaling/RDLStatement.g4 | 18 +++----
.../distsql/parser/autogen/ScalingStatement.g4 | 8 ++--
.../parser/core/ScalingSQLStatementVisitor.java | 56 +++++++++++-----------
...ava => CreateShardingScalingRuleStatement.java} | 8 ++--
...va => DisableShardingScalingRuleStatement.java} | 4 +-
....java => DropShardingScalingRuleStatement.java} | 4 +-
...ava => EnableShardingScalingRuleStatement.java} | 4 +-
...> ShardingScalingRuleConfigurationSegment.java} | 4 +-
.../rdl/alter/AlterRuleStatementAssert.java | 20 ++++----
...DisableShardingScalingRuleStatementAssert.java} | 16 +++----
... EnableShardingScalingRuleStatementAssert.java} | 16 +++----
.../rdl/create/CreateRuleStatementAssert.java | 10 ++--
... CreateShardingScalingRuleStatementAssert.java} | 30 ++++++------
.../distsql/rdl/drop/DropRuleStatementAssert.java | 10 ++--
...=> DropShardingScalingRuleStatementAssert.java} | 16 +++----
.../jaxb/cases/domain/SQLParserTestCases.java | 32 ++++++-------
...edShardingScalingRuleConfigurationSegment.java} | 4 +-
...sableShardingScalingRuleStatementTestCase.java} | 4 +-
...nableShardingScalingRuleStatementTestCase.java} | 4 +-
...reateShardingScalingRuleStatementTestCase.java} | 8 ++--
... DropShardingScalingRuleStatementTestCase.java} | 4 +-
.../src/main/resources/case/rdl/alter.xml | 4 +-
.../src/main/resources/case/rdl/create.xml | 14 +++---
.../src/main/resources/case/rdl/drop.xml | 2 +-
.../src/main/resources/sql/supported/rdl/alter.xml | 4 +-
.../main/resources/sql/supported/rdl/create.xml | 8 ++--
.../src/main/resources/sql/supported/rdl/drop.xml | 2 +-
38 files changed, 250 insertions(+), 246 deletions(-)
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/CreateShardingScalingStatementUpdater.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/CreateShardingScalingRuleStatementUpdater.java
similarity index 84%
rename from
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/CreateShardingScalingStatementUpdater.java
rename to
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/CreateShardingScalingRuleStatementUpdater.java
index a1c01a8..1855425 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/CreateShardingScalingStatementUpdater.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/CreateShardingScalingRuleStatementUpdater.java
@@ -29,9 +29,9 @@ import
org.apache.shardingsphere.infra.distsql.exception.rule.InvalidAlgorithmCo
import
org.apache.shardingsphere.infra.distsql.exception.rule.RequiredRuleMissedException;
import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionCreateUpdater;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
-import
org.apache.shardingsphere.scaling.distsql.handler.converter.ShardingScalingStatementConverter;
-import
org.apache.shardingsphere.scaling.distsql.statement.CreateShardingScalingStatement;
-import
org.apache.shardingsphere.scaling.distsql.statement.segment.ShardingScalingConfigurationSegment;
+import
org.apache.shardingsphere.scaling.distsql.handler.converter.ShardingScalingRuleStatementConverter;
+import
org.apache.shardingsphere.scaling.distsql.statement.CreateShardingScalingRuleStatement;
+import
org.apache.shardingsphere.scaling.distsql.statement.segment.ShardingScalingRuleConfigurationSegment;
import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
import org.apache.shardingsphere.spi.typed.TypedSPI;
import org.apache.shardingsphere.spi.typed.TypedSPIRegistry;
@@ -43,12 +43,12 @@ import java.util.Optional;
import java.util.Properties;
/**
- * Create sharding scaling statement updater.
+ * Create sharding scaling rule statement updater.
*/
-public final class CreateShardingScalingStatementUpdater implements
RuleDefinitionCreateUpdater<CreateShardingScalingStatement,
ShardingRuleConfiguration> {
+public final class CreateShardingScalingRuleStatementUpdater implements
RuleDefinitionCreateUpdater<CreateShardingScalingRuleStatement,
ShardingRuleConfiguration> {
@Override
- public void checkSQLStatement(final ShardingSphereMetaData
shardingSphereMetaData, final CreateShardingScalingStatement sqlStatement,
+ public void checkSQLStatement(final ShardingSphereMetaData
shardingSphereMetaData, final CreateShardingScalingRuleStatement sqlStatement,
final ShardingRuleConfiguration
currentRuleConfig) throws DistSQLException {
String schemaName = shardingSphereMetaData.getName();
checkCurrentRuleConfiguration(schemaName, currentRuleConfig);
@@ -62,13 +62,13 @@ public final class CreateShardingScalingStatementUpdater
implements RuleDefiniti
}
}
- private void checkDuplicate(final String schemaName, final
CreateShardingScalingStatement sqlStatement, final ShardingRuleConfiguration
currentRuleConfig) throws DistSQLException {
+ private void checkDuplicate(final String schemaName, final
CreateShardingScalingRuleStatement sqlStatement, final
ShardingRuleConfiguration currentRuleConfig) throws DistSQLException {
if
(currentRuleConfig.getScaling().containsKey(sqlStatement.getScalingName())) {
throw new DuplicateRuleException("Scaling", schemaName,
Arrays.asList(sqlStatement.getScalingName()));
}
}
- private void checkAlgorithms(final CreateShardingScalingStatement
sqlStatement) throws DistSQLException {
+ private void checkAlgorithms(final CreateShardingScalingRuleStatement
sqlStatement) throws DistSQLException {
if (null == sqlStatement.getConfigurationSegment()) {
return;
}
@@ -78,7 +78,7 @@ public final class CreateShardingScalingStatementUpdater
implements RuleDefiniti
checkDataConsistencyCheckerExist(sqlStatement.getConfigurationSegment());
}
- private void checkRateLimiterExist(final
ShardingScalingConfigurationSegment segment) throws DistSQLException {
+ private void checkRateLimiterExist(final
ShardingScalingRuleConfigurationSegment segment) throws DistSQLException {
if (null != segment.getInputSegment()) {
checkRateLimiterAlgorithm(segment.getInputSegment().getRateLimiter());
}
@@ -91,19 +91,19 @@ public final class CreateShardingScalingStatementUpdater
implements RuleDefiniti
checkAlgorithm(JobRateLimitAlgorithm.class, "rate limiter",
rateLimiter);
}
- private void checkStreamChannelExist(final
ShardingScalingConfigurationSegment segment) throws DistSQLException {
+ private void checkStreamChannelExist(final
ShardingScalingRuleConfigurationSegment segment) throws DistSQLException {
if (null != segment.getStreamChannel()) {
checkAlgorithm(PipelineChannelFactory.class, "stream channel",
segment.getStreamChannel());
}
}
- private void checkCompletionDetectorExist(final
ShardingScalingConfigurationSegment segment) throws DistSQLException {
+ private void checkCompletionDetectorExist(final
ShardingScalingRuleConfigurationSegment segment) throws DistSQLException {
if (null != segment.getCompletionDetector()) {
checkAlgorithm(JobCompletionDetectAlgorithm.class, "completion
detector", segment.getCompletionDetector());
}
}
- private void checkDataConsistencyCheckerExist(final
ShardingScalingConfigurationSegment segment) throws DistSQLException {
+ private void checkDataConsistencyCheckerExist(final
ShardingScalingRuleConfigurationSegment segment) throws DistSQLException {
if (null != segment.getDataConsistencyChecker()) {
checkAlgorithm(DataConsistencyCheckAlgorithm.class, "data
consistency checker", segment.getDataConsistencyChecker());
}
@@ -117,7 +117,7 @@ public final class CreateShardingScalingStatementUpdater
implements RuleDefiniti
}
@Override
- public ShardingRuleConfiguration buildToBeCreatedRuleConfiguration(final
CreateShardingScalingStatement sqlStatement) {
+ public ShardingRuleConfiguration buildToBeCreatedRuleConfiguration(final
CreateShardingScalingRuleStatement sqlStatement) {
ShardingRuleConfiguration result = new ShardingRuleConfiguration();
Map<String, OnRuleAlteredActionConfiguration> scalingConfigurationMap
= new HashMap<>(1, 1);
scalingConfigurationMap.put(sqlStatement.getScalingName(),
buildScalingConfiguration(sqlStatement.getConfigurationSegment()));
@@ -125,11 +125,11 @@ public final class CreateShardingScalingStatementUpdater
implements RuleDefiniti
return result;
}
- private OnRuleAlteredActionConfiguration buildScalingConfiguration(final
ShardingScalingConfigurationSegment segment) {
+ private OnRuleAlteredActionConfiguration buildScalingConfiguration(final
ShardingScalingRuleConfigurationSegment segment) {
if (null == segment) {
return buildNullScalingConfiguration();
}
- return ShardingScalingStatementConverter.convert(segment);
+ return ShardingScalingRuleStatementConverter.convert(segment);
}
private OnRuleAlteredActionConfiguration buildNullScalingConfiguration() {
@@ -151,6 +151,6 @@ public final class CreateShardingScalingStatementUpdater
implements RuleDefiniti
@Override
public String getType() {
- return CreateShardingScalingStatement.class.getCanonicalName();
+ return CreateShardingScalingRuleStatement.class.getCanonicalName();
}
}
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/DisableShardingScalingStatementUpdater.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/DisableShardingScalingRuleStatementUpdater.java
similarity index 82%
rename from
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/DisableShardingScalingStatementUpdater.java
rename to
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/DisableShardingScalingRuleStatementUpdater.java
index 88efbc2..c6fad91 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/DisableShardingScalingStatementUpdater.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/DisableShardingScalingRuleStatementUpdater.java
@@ -22,16 +22,16 @@ import
org.apache.shardingsphere.infra.distsql.exception.rule.RequiredRuleMissed
import
org.apache.shardingsphere.infra.distsql.exception.rule.RuleDisabledException;
import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionAlterUpdater;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
-import
org.apache.shardingsphere.scaling.distsql.statement.DisableShardingScalingStatement;
+import
org.apache.shardingsphere.scaling.distsql.statement.DisableShardingScalingRuleStatement;
import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
/**
- * Disable sharding scaling statement updater.
+ * Disable sharding scaling rule statement updater.
*/
-public final class DisableShardingScalingStatementUpdater implements
RuleDefinitionAlterUpdater<DisableShardingScalingStatement,
ShardingRuleConfiguration> {
+public final class DisableShardingScalingRuleStatementUpdater implements
RuleDefinitionAlterUpdater<DisableShardingScalingRuleStatement,
ShardingRuleConfiguration> {
@Override
- public void checkSQLStatement(final ShardingSphereMetaData
shardingSphereMetaData, final DisableShardingScalingStatement sqlStatement,
+ public void checkSQLStatement(final ShardingSphereMetaData
shardingSphereMetaData, final DisableShardingScalingRuleStatement sqlStatement,
final ShardingRuleConfiguration
currentRuleConfig) throws DistSQLException {
String schemaName = shardingSphereMetaData.getName();
checkCurrentRuleConfiguration(schemaName, currentRuleConfig);
@@ -45,20 +45,20 @@ public final class DisableShardingScalingStatementUpdater
implements RuleDefinit
}
}
- private void checkExist(final String schemaName, final
DisableShardingScalingStatement sqlStatement, final ShardingRuleConfiguration
currentRuleConfig) throws DistSQLException {
+ private void checkExist(final String schemaName, final
DisableShardingScalingRuleStatement sqlStatement, final
ShardingRuleConfiguration currentRuleConfig) throws DistSQLException {
if
(!currentRuleConfig.getScaling().containsKey(sqlStatement.getScalingName())) {
throw new RequiredRuleMissedException("Scaling", schemaName,
sqlStatement.getScalingName());
}
}
- private void checkDisabled(final String schemaName, final
DisableShardingScalingStatement sqlStatement, final ShardingRuleConfiguration
currentRuleConfig) throws DistSQLException {
+ private void checkDisabled(final String schemaName, final
DisableShardingScalingRuleStatement sqlStatement, final
ShardingRuleConfiguration currentRuleConfig) throws DistSQLException {
if (null == currentRuleConfig.getScalingName() ||
!currentRuleConfig.getScalingName().equals(sqlStatement.getScalingName())) {
throw new RuleDisabledException("Scaling", schemaName,
sqlStatement.getScalingName());
}
}
@Override
- public ShardingRuleConfiguration buildToBeAlteredRuleConfiguration(final
DisableShardingScalingStatement sqlStatement) {
+ public ShardingRuleConfiguration buildToBeAlteredRuleConfiguration(final
DisableShardingScalingRuleStatement sqlStatement) {
return null;
}
@@ -74,6 +74,6 @@ public final class DisableShardingScalingStatementUpdater
implements RuleDefinit
@Override
public String getType() {
- return DisableShardingScalingStatement.class.getCanonicalName();
+ return DisableShardingScalingRuleStatement.class.getCanonicalName();
}
}
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/DropShardingScalingStatementUpdater.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/DropShardingScalingRuleStatementUpdater.java
similarity index 82%
rename from
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/DropShardingScalingStatementUpdater.java
rename to
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/DropShardingScalingRuleStatementUpdater.java
index 6507bd4..93a8c55 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/DropShardingScalingStatementUpdater.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/DropShardingScalingRuleStatementUpdater.java
@@ -21,16 +21,16 @@ import
org.apache.shardingsphere.infra.distsql.exception.DistSQLException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RequiredRuleMissedException;
import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionDropUpdater;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
-import
org.apache.shardingsphere.scaling.distsql.statement.DropShardingScalingStatement;
+import
org.apache.shardingsphere.scaling.distsql.statement.DropShardingScalingRuleStatement;
import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
/**
- * Drop sharding scaling statement updater.
+ * Drop sharding scaling rule statement updater.
*/
-public final class DropShardingScalingStatementUpdater implements
RuleDefinitionDropUpdater<DropShardingScalingStatement,
ShardingRuleConfiguration> {
+public final class DropShardingScalingRuleStatementUpdater implements
RuleDefinitionDropUpdater<DropShardingScalingRuleStatement,
ShardingRuleConfiguration> {
@Override
- public void checkSQLStatement(final ShardingSphereMetaData
shardingSphereMetaData, final DropShardingScalingStatement sqlStatement,
+ public void checkSQLStatement(final ShardingSphereMetaData
shardingSphereMetaData, final DropShardingScalingRuleStatement sqlStatement,
final ShardingRuleConfiguration
currentRuleConfig) throws DistSQLException {
String schemaName = shardingSphereMetaData.getName();
checkCurrentRuleConfiguration(schemaName, currentRuleConfig);
@@ -43,19 +43,19 @@ public final class DropShardingScalingStatementUpdater
implements RuleDefinition
}
}
- private void checkStatement(final String schemaName, final
DropShardingScalingStatement sqlStatement, final ShardingRuleConfiguration
currentRuleConfig) throws DistSQLException {
+ private void checkStatement(final String schemaName, final
DropShardingScalingRuleStatement sqlStatement, final ShardingRuleConfiguration
currentRuleConfig) throws DistSQLException {
checkExist(schemaName, sqlStatement, currentRuleConfig);
// TODO checkNotInUse
}
- private void checkExist(final String schemaName, final
DropShardingScalingStatement sqlStatement, final ShardingRuleConfiguration
currentRuleConfig) throws DistSQLException {
+ private void checkExist(final String schemaName, final
DropShardingScalingRuleStatement sqlStatement, final ShardingRuleConfiguration
currentRuleConfig) throws DistSQLException {
if
(!currentRuleConfig.getScaling().containsKey(sqlStatement.getScalingName())) {
throw new RequiredRuleMissedException("Scaling", schemaName,
sqlStatement.getScalingName());
}
}
@Override
- public boolean updateCurrentRuleConfiguration(final
DropShardingScalingStatement sqlStatement, final ShardingRuleConfiguration
currentRuleConfig) {
+ public boolean updateCurrentRuleConfiguration(final
DropShardingScalingRuleStatement sqlStatement, final ShardingRuleConfiguration
currentRuleConfig) {
currentRuleConfig.getScaling().remove(sqlStatement.getScalingName());
if (null != currentRuleConfig.getScalingName() &&
currentRuleConfig.getScalingName().equalsIgnoreCase(sqlStatement.getScalingName()))
{
currentRuleConfig.setScalingName(null);
@@ -70,6 +70,6 @@ public final class DropShardingScalingStatementUpdater
implements RuleDefinition
@Override
public String getType() {
- return DropShardingScalingStatement.class.getCanonicalName();
+ return DropShardingScalingRuleStatement.class.getCanonicalName();
}
}
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/EnableShardingScalingStatementUpdater.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/EnableShardingScalingRuleStatementUpdater.java
similarity index 83%
rename from
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/EnableShardingScalingStatementUpdater.java
rename to
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/EnableShardingScalingRuleStatementUpdater.java
index 78d14c1..02f47d6 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/EnableShardingScalingStatementUpdater.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/EnableShardingScalingRuleStatementUpdater.java
@@ -22,16 +22,16 @@ import
org.apache.shardingsphere.infra.distsql.exception.rule.RequiredRuleMissed
import
org.apache.shardingsphere.infra.distsql.exception.rule.RuleEnabledException;
import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionAlterUpdater;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
-import
org.apache.shardingsphere.scaling.distsql.statement.EnableShardingScalingStatement;
+import
org.apache.shardingsphere.scaling.distsql.statement.EnableShardingScalingRuleStatement;
import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
/**
- * Enable sharding scaling statement updater.
+ * Enable sharding scaling rule statement updater.
*/
-public final class EnableShardingScalingStatementUpdater implements
RuleDefinitionAlterUpdater<EnableShardingScalingStatement,
ShardingRuleConfiguration> {
+public final class EnableShardingScalingRuleStatementUpdater implements
RuleDefinitionAlterUpdater<EnableShardingScalingRuleStatement,
ShardingRuleConfiguration> {
@Override
- public void checkSQLStatement(final ShardingSphereMetaData
shardingSphereMetaData, final EnableShardingScalingStatement sqlStatement,
+ public void checkSQLStatement(final ShardingSphereMetaData
shardingSphereMetaData, final EnableShardingScalingRuleStatement sqlStatement,
final ShardingRuleConfiguration
currentRuleConfig) throws DistSQLException {
String schemaName = shardingSphereMetaData.getName();
checkCurrentRuleConfiguration(schemaName, currentRuleConfig);
@@ -45,20 +45,20 @@ public final class EnableShardingScalingStatementUpdater
implements RuleDefiniti
}
}
- private void checkExist(final String schemaName, final
EnableShardingScalingStatement sqlStatement, final ShardingRuleConfiguration
currentRuleConfig) throws DistSQLException {
+ private void checkExist(final String schemaName, final
EnableShardingScalingRuleStatement sqlStatement, final
ShardingRuleConfiguration currentRuleConfig) throws DistSQLException {
if
(!currentRuleConfig.getScaling().containsKey(sqlStatement.getScalingName())) {
throw new RequiredRuleMissedException("Scaling", schemaName,
sqlStatement.getScalingName());
}
}
- private void checkEnabled(final String schemaName, final
EnableShardingScalingStatement sqlStatement, final ShardingRuleConfiguration
currentRuleConfig) throws DistSQLException {
+ private void checkEnabled(final String schemaName, final
EnableShardingScalingRuleStatement sqlStatement, final
ShardingRuleConfiguration currentRuleConfig) throws DistSQLException {
if (null != currentRuleConfig.getScalingName() &&
currentRuleConfig.getScalingName().equals(sqlStatement.getScalingName())) {
throw new RuleEnabledException("Scaling", schemaName,
sqlStatement.getScalingName());
}
}
@Override
- public ShardingRuleConfiguration buildToBeAlteredRuleConfiguration(final
EnableShardingScalingStatement sqlStatement) {
+ public ShardingRuleConfiguration buildToBeAlteredRuleConfiguration(final
EnableShardingScalingRuleStatement sqlStatement) {
ShardingRuleConfiguration result = new ShardingRuleConfiguration();
result.setScalingName(sqlStatement.getScalingName());
return result;
@@ -76,6 +76,6 @@ public final class EnableShardingScalingStatementUpdater
implements RuleDefiniti
@Override
public String getType() {
- return EnableShardingScalingStatement.class.getCanonicalName();
+ return EnableShardingScalingRuleStatement.class.getCanonicalName();
}
}
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/converter/ShardingScalingStatementConverter.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/converter/ShardingScalingRuleStatementConverter.java
similarity index 89%
rename from
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/converter/ShardingScalingStatementConverter.java
rename to
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/converter/ShardingScalingRuleStatementConverter.java
index e0f7199..f3be7e4 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/converter/ShardingScalingStatementConverter.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/scaling/distsql/handler/converter/ShardingScalingRuleStatementConverter.java
@@ -25,21 +25,21 @@ import
org.apache.shardingsphere.infra.config.rulealtered.OnRuleAlteredActionCon
import
org.apache.shardingsphere.infra.config.rulealtered.OnRuleAlteredActionConfiguration.InputConfiguration;
import
org.apache.shardingsphere.infra.config.rulealtered.OnRuleAlteredActionConfiguration.OutputConfiguration;
import
org.apache.shardingsphere.scaling.distsql.statement.segment.InputOrOutputSegment;
-import
org.apache.shardingsphere.scaling.distsql.statement.segment.ShardingScalingConfigurationSegment;
+import
org.apache.shardingsphere.scaling.distsql.statement.segment.ShardingScalingRuleConfigurationSegment;
/**
- * Sharding scaling statement converter.
+ * Sharding scaling rule statement converter.
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public final class ShardingScalingStatementConverter {
+public final class ShardingScalingRuleStatementConverter {
/**
- * Convert sharding scaling configuration segment to on rule altered
action configuration.
+ * Convert sharding scaling rule configuration segment to on rule altered
action configuration.
*
- * @param segment sharding scaling configuration segment
- * @return sharding rule configuration
+ * @param segment sharding scaling rule configuration segment
+ * @return on rule altered action configuration
*/
- public static OnRuleAlteredActionConfiguration convert(final
ShardingScalingConfigurationSegment segment) {
+ public static OnRuleAlteredActionConfiguration convert(final
ShardingScalingRuleConfigurationSegment segment) {
InputConfiguration inputConfiguration =
convertToInputConfiguration(segment.getInputSegment());
OutputConfiguration outputConfiguration =
convertToOutputConfiguration(segment.getOutputSegment());
ShardingSphereAlgorithmConfiguration streamChannel =
convertToAlgorithm(segment.getStreamChannel());
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater
index a04fa07..19f645f 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater
@@ -33,7 +33,7 @@
org.apache.shardingsphere.sharding.distsql.handler.update.AlterShardingKeyGenera
org.apache.shardingsphere.sharding.distsql.handler.update.DropShardingKeyGeneratorStatementUpdater
org.apache.shardingsphere.sharding.distsql.handler.update.AlterDefaultShardingStrategyStatementUpdater
org.apache.shardingsphere.sharding.distsql.handler.update.DropDefaultStrategyStatementUpdater
-org.apache.shardingsphere.scaling.distsql.handler.CreateShardingScalingStatementUpdater
-org.apache.shardingsphere.scaling.distsql.handler.DropShardingScalingStatementUpdater
-org.apache.shardingsphere.scaling.distsql.handler.EnableShardingScalingStatementUpdater
-org.apache.shardingsphere.scaling.distsql.handler.DisableShardingScalingStatementUpdater
+org.apache.shardingsphere.scaling.distsql.handler.CreateShardingScalingRuleStatementUpdater
+org.apache.shardingsphere.scaling.distsql.handler.DropShardingScalingRuleStatementUpdater
+org.apache.shardingsphere.scaling.distsql.handler.EnableShardingScalingRuleStatementUpdater
+org.apache.shardingsphere.scaling.distsql.handler.DisableShardingScalingRuleStatementUpdater
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/CreateShardingScalingStatementUpdaterTest.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/CreateShardingScalingRuleStatementUpdaterTest.java
similarity index 81%
rename from
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/CreateShardingScalingStatementUpdaterTest.java
rename to
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/CreateShardingScalingRuleStatementUpdaterTest.java
index ea51356..3d8e2da 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/CreateShardingScalingStatementUpdaterTest.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/CreateShardingScalingRuleStatementUpdaterTest.java
@@ -28,9 +28,9 @@ import
org.apache.shardingsphere.infra.distsql.exception.rule.DuplicateRuleExcep
import
org.apache.shardingsphere.infra.distsql.exception.rule.InvalidAlgorithmConfigurationException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RequiredRuleMissedException;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
-import
org.apache.shardingsphere.scaling.distsql.statement.CreateShardingScalingStatement;
+import
org.apache.shardingsphere.scaling.distsql.statement.CreateShardingScalingRuleStatement;
import
org.apache.shardingsphere.scaling.distsql.statement.segment.InputOrOutputSegment;
-import
org.apache.shardingsphere.scaling.distsql.statement.segment.ShardingScalingConfigurationSegment;
+import
org.apache.shardingsphere.scaling.distsql.statement.segment.ShardingScalingRuleConfigurationSegment;
import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
import org.apache.shardingsphere.spi.ShardingSphereServiceLoader;
import org.junit.Before;
@@ -46,12 +46,12 @@ import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.when;
@RunWith(MockitoJUnitRunner.class)
-public final class CreateShardingScalingStatementUpdaterTest {
+public final class CreateShardingScalingRuleStatementUpdaterTest {
@Mock
private ShardingSphereMetaData shardingSphereMetaData;
- private final CreateShardingScalingStatementUpdater updater = new
CreateShardingScalingStatementUpdater();
+ private final CreateShardingScalingRuleStatementUpdater updater = new
CreateShardingScalingRuleStatementUpdater();
@Before
public void before() {
@@ -77,7 +77,7 @@ public final class CreateShardingScalingStatementUpdaterTest {
@Test(expected = InvalidAlgorithmConfigurationException.class)
public void assertCheckInvalidRateLimiter() throws DistSQLException {
ShardingRuleConfiguration currentRuleConfig = new
ShardingRuleConfiguration();
- CreateShardingScalingStatement statement = new
CreateShardingScalingStatement("default_scaling");
+ CreateShardingScalingRuleStatement statement = new
CreateShardingScalingRuleStatement("default_scaling");
statement.setConfigurationSegment(createConfigurationWithInvalidRateLimiter());
updater.checkSQLStatement(shardingSphereMetaData, statement,
currentRuleConfig);
}
@@ -85,7 +85,7 @@ public final class CreateShardingScalingStatementUpdaterTest {
@Test(expected = InvalidAlgorithmConfigurationException.class)
public void assertCheckInvalidStreamChannel() throws DistSQLException {
ShardingRuleConfiguration currentRuleConfig = new
ShardingRuleConfiguration();
- CreateShardingScalingStatement statement = new
CreateShardingScalingStatement("default_scaling");
+ CreateShardingScalingRuleStatement statement = new
CreateShardingScalingRuleStatement("default_scaling");
statement.setConfigurationSegment(createConfigurationWithInvalidStreamChannel());
updater.checkSQLStatement(shardingSphereMetaData, statement,
currentRuleConfig);
}
@@ -93,7 +93,7 @@ public final class CreateShardingScalingStatementUpdaterTest {
@Test(expected = InvalidAlgorithmConfigurationException.class)
public void assertCheckInvalidCompletionDetector() throws DistSQLException
{
ShardingRuleConfiguration currentRuleConfig = new
ShardingRuleConfiguration();
- CreateShardingScalingStatement statement = new
CreateShardingScalingStatement("default_scaling");
+ CreateShardingScalingRuleStatement statement = new
CreateShardingScalingRuleStatement("default_scaling");
statement.setConfigurationSegment(createConfigurationWithInvalidCompletionDetector());
updater.checkSQLStatement(shardingSphereMetaData, statement,
currentRuleConfig);
}
@@ -101,7 +101,7 @@ public final class
CreateShardingScalingStatementUpdaterTest {
@Test(expected = InvalidAlgorithmConfigurationException.class)
public void assertCheckInvalidDataConsistencyChecker() throws
DistSQLException {
ShardingRuleConfiguration currentRuleConfig = new
ShardingRuleConfiguration();
- CreateShardingScalingStatement statement = new
CreateShardingScalingStatement("default_scaling");
+ CreateShardingScalingRuleStatement statement = new
CreateShardingScalingRuleStatement("default_scaling");
statement.setConfigurationSegment(createConfigurationWithInvalidDataConsistencyChecker());
updater.checkSQLStatement(shardingSphereMetaData, statement,
currentRuleConfig);
}
@@ -115,7 +115,7 @@ public final class
CreateShardingScalingStatementUpdaterTest {
@Test
public void assertCheckSuccessWithCompleteConfiguration() throws
DistSQLException {
ShardingRuleConfiguration currentRuleConfig = new
ShardingRuleConfiguration();
- CreateShardingScalingStatement statement = new
CreateShardingScalingStatement("default_scaling");
+ CreateShardingScalingRuleStatement statement = new
CreateShardingScalingRuleStatement("default_scaling");
statement.setConfigurationSegment(createCompleteConfiguration());
updater.checkSQLStatement(shardingSphereMetaData,
createSQLStatement("default_scaling"), currentRuleConfig);
}
@@ -129,7 +129,7 @@ public final class
CreateShardingScalingStatementUpdaterTest {
@Test
public void assertBuildCompleteConfiguration() {
- CreateShardingScalingStatement statement = new
CreateShardingScalingStatement("default_scaling");
+ CreateShardingScalingRuleStatement statement = new
CreateShardingScalingRuleStatement("default_scaling");
statement.setConfigurationSegment(createCompleteConfiguration());
ShardingRuleConfiguration result =
updater.buildToBeCreatedRuleConfiguration(statement);
assertThat(result.getScaling().size(), is(1));
@@ -146,7 +146,7 @@ public final class
CreateShardingScalingStatementUpdaterTest {
@Test
public void assertUpdateSuccess() {
ShardingRuleConfiguration currentRuleConfig = new
ShardingRuleConfiguration();
- CreateShardingScalingStatement statement = new
CreateShardingScalingStatement("default_scaling");
+ CreateShardingScalingRuleStatement statement = new
CreateShardingScalingRuleStatement("default_scaling");
statement.setConfigurationSegment(createCompleteConfiguration());
ShardingRuleConfiguration toBeCreatedRuleConfiguration =
updater.buildToBeCreatedRuleConfiguration(statement);
updater.updateCurrentRuleConfiguration(currentRuleConfig,
toBeCreatedRuleConfiguration);
@@ -162,12 +162,12 @@ public final class
CreateShardingScalingStatementUpdaterTest {
assertThat(value.getDataConsistencyChecker().getType(),
is("DATA_MATCH"));
}
- private CreateShardingScalingStatement createSQLStatement(final String
scalingName) {
- return new CreateShardingScalingStatement(scalingName);
+ private CreateShardingScalingRuleStatement createSQLStatement(final String
scalingName) {
+ return new CreateShardingScalingRuleStatement(scalingName);
}
- private ShardingScalingConfigurationSegment
createConfigurationWithInvalidRateLimiter() {
- ShardingScalingConfigurationSegment result = new
ShardingScalingConfigurationSegment();
+ private ShardingScalingRuleConfigurationSegment
createConfigurationWithInvalidRateLimiter() {
+ ShardingScalingRuleConfigurationSegment result = new
ShardingScalingRuleConfigurationSegment();
result.setInputSegment(createInputOrOutputSegment("TPS"));
result.setOutputSegment(createInputOrOutputSegment("INVALID"));
return result;
@@ -177,26 +177,26 @@ public final class
CreateShardingScalingStatementUpdaterTest {
return new InputOrOutputSegment(10, 1000,
createAlgorithmSegment(type));
}
- private ShardingScalingConfigurationSegment
createConfigurationWithInvalidStreamChannel() {
- ShardingScalingConfigurationSegment result = new
ShardingScalingConfigurationSegment();
+ private ShardingScalingRuleConfigurationSegment
createConfigurationWithInvalidStreamChannel() {
+ ShardingScalingRuleConfigurationSegment result = new
ShardingScalingRuleConfigurationSegment();
result.setStreamChannel(createAlgorithmSegment("INVALID"));
return result;
}
- private ShardingScalingConfigurationSegment
createConfigurationWithInvalidCompletionDetector() {
- ShardingScalingConfigurationSegment result = new
ShardingScalingConfigurationSegment();
+ private ShardingScalingRuleConfigurationSegment
createConfigurationWithInvalidCompletionDetector() {
+ ShardingScalingRuleConfigurationSegment result = new
ShardingScalingRuleConfigurationSegment();
result.setCompletionDetector(createAlgorithmSegment("INVALID"));
return result;
}
- private ShardingScalingConfigurationSegment
createConfigurationWithInvalidDataConsistencyChecker() {
- ShardingScalingConfigurationSegment result = new
ShardingScalingConfigurationSegment();
+ private ShardingScalingRuleConfigurationSegment
createConfigurationWithInvalidDataConsistencyChecker() {
+ ShardingScalingRuleConfigurationSegment result = new
ShardingScalingRuleConfigurationSegment();
result.setDataConsistencyChecker(createAlgorithmSegment("INVALID"));
return result;
}
- private ShardingScalingConfigurationSegment createCompleteConfiguration() {
- ShardingScalingConfigurationSegment result = new
ShardingScalingConfigurationSegment();
+ private ShardingScalingRuleConfigurationSegment
createCompleteConfiguration() {
+ ShardingScalingRuleConfigurationSegment result = new
ShardingScalingRuleConfigurationSegment();
result.setInputSegment(createInputOrOutputSegment("QPS"));
result.setOutputSegment(createInputOrOutputSegment("TPS"));
result.setStreamChannel(createAlgorithmSegment("MEMORY"));
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/DisabledShardingScalingStatementUpdaterTest.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/DisabledShardingScalingRuleStatementUpdaterTest.java
similarity index 90%
rename from
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/DisabledShardingScalingStatementUpdaterTest.java
rename to
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/DisabledShardingScalingRuleStatementUpdaterTest.java
index c666e54..5d66f1d 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/DisabledShardingScalingStatementUpdaterTest.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/DisabledShardingScalingRuleStatementUpdaterTest.java
@@ -21,7 +21,7 @@ import
org.apache.shardingsphere.infra.distsql.exception.DistSQLException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RequiredRuleMissedException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RuleDisabledException;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
-import
org.apache.shardingsphere.scaling.distsql.statement.DisableShardingScalingStatement;
+import
org.apache.shardingsphere.scaling.distsql.statement.DisableShardingScalingRuleStatement;
import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
import org.junit.Before;
import org.junit.Test;
@@ -33,12 +33,12 @@ import static org.junit.Assert.assertNull;
import static org.mockito.Mockito.when;
@RunWith(MockitoJUnitRunner.class)
-public final class DisabledShardingScalingStatementUpdaterTest {
+public final class DisabledShardingScalingRuleStatementUpdaterTest {
@Mock
private ShardingSphereMetaData shardingSphereMetaData;
- private final DisableShardingScalingStatementUpdater updater = new
DisableShardingScalingStatementUpdater();
+ private final DisableShardingScalingRuleStatementUpdater updater = new
DisableShardingScalingRuleStatementUpdater();
@Before
public void before() {
@@ -80,7 +80,7 @@ public final class
DisabledShardingScalingStatementUpdaterTest {
assertNull(currentRuleConfig.getScalingName());
}
- private DisableShardingScalingStatement createSQLStatement(final String
scalingName) {
- return new DisableShardingScalingStatement(scalingName);
+ private DisableShardingScalingRuleStatement createSQLStatement(final
String scalingName) {
+ return new DisableShardingScalingRuleStatement(scalingName);
}
}
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/DropShardingScalingStatementUpdaterTest.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/DropShardingScalingRuleStatementUpdaterTest.java
similarity index 89%
rename from
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/DropShardingScalingStatementUpdaterTest.java
rename to
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/DropShardingScalingRuleStatementUpdaterTest.java
index 718b549..6d59690 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/DropShardingScalingStatementUpdaterTest.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/DropShardingScalingRuleStatementUpdaterTest.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.scaling.distsql.handler;
import org.apache.shardingsphere.infra.distsql.exception.DistSQLException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RequiredRuleMissedException;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
-import
org.apache.shardingsphere.scaling.distsql.statement.DropShardingScalingStatement;
+import
org.apache.shardingsphere.scaling.distsql.statement.DropShardingScalingRuleStatement;
import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
import org.junit.Before;
import org.junit.Test;
@@ -33,12 +33,12 @@ import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.when;
@RunWith(MockitoJUnitRunner.class)
-public final class DropShardingScalingStatementUpdaterTest {
+public final class DropShardingScalingRuleStatementUpdaterTest {
@Mock
private ShardingSphereMetaData shardingSphereMetaData;
- private final DropShardingScalingStatementUpdater updater = new
DropShardingScalingStatementUpdater();
+ private final DropShardingScalingRuleStatementUpdater updater = new
DropShardingScalingRuleStatementUpdater();
@Before
public void before() {
@@ -72,7 +72,7 @@ public final class DropShardingScalingStatementUpdaterTest {
assertNull(currentRuleConfig.getScalingName());
}
- private DropShardingScalingStatement createSQLStatement(final String
scalingName) {
- return new DropShardingScalingStatement(scalingName);
+ private DropShardingScalingRuleStatement createSQLStatement(final String
scalingName) {
+ return new DropShardingScalingRuleStatement(scalingName);
}
}
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/EnableShardingScalingStatementUpdaterTest.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/EnableShardingScalingRuleStatementUpdaterTest.java
similarity index 91%
rename from
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/EnableShardingScalingStatementUpdaterTest.java
rename to
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/EnableShardingScalingRuleStatementUpdaterTest.java
index f1dec1a..08bd0ed 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/EnableShardingScalingStatementUpdaterTest.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/scaling/distsql/handler/EnableShardingScalingRuleStatementUpdaterTest.java
@@ -21,7 +21,7 @@ import
org.apache.shardingsphere.infra.distsql.exception.DistSQLException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RequiredRuleMissedException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RuleEnabledException;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
-import
org.apache.shardingsphere.scaling.distsql.statement.EnableShardingScalingStatement;
+import
org.apache.shardingsphere.scaling.distsql.statement.EnableShardingScalingRuleStatement;
import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
import org.junit.Before;
import org.junit.Test;
@@ -35,12 +35,12 @@ import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.when;
@RunWith(MockitoJUnitRunner.class)
-public final class EnableShardingScalingStatementUpdaterTest {
+public final class EnableShardingScalingRuleStatementUpdaterTest {
@Mock
private ShardingSphereMetaData shardingSphereMetaData;
- private final EnableShardingScalingStatementUpdater updater = new
EnableShardingScalingStatementUpdater();
+ private final EnableShardingScalingRuleStatementUpdater updater = new
EnableShardingScalingRuleStatementUpdater();
@Before
public void before() {
@@ -89,7 +89,7 @@ public final class EnableShardingScalingStatementUpdaterTest {
assertThat(currentRuleConfig.getScalingName(), is("new_scaling"));
}
- private EnableShardingScalingStatement createSQLStatement(final String
scalingName) {
- return new EnableShardingScalingStatement(scalingName);
+ private EnableShardingScalingRuleStatement createSQLStatement(final String
scalingName) {
+ return new EnableShardingScalingRuleStatement(scalingName);
}
}
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/antlr4/imports/scaling/Keyword.g4
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/antlr4/imports/scaling/Keyword.g4
index 9dce7ee..26283b6 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/antlr4/imports/scaling/Keyword.g4
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/antlr4/imports/scaling/Keyword.g4
@@ -67,6 +67,10 @@ SCALING
: S C A L I N G
;
+RULE
+ : R U L E
+ ;
+
JOB
: J O B
;
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/antlr4/imports/scaling/RDLStatement.g4
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/antlr4/imports/scaling/RDLStatement.g4
index 92fc5d8..17827dd 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/antlr4/imports/scaling/RDLStatement.g4
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/antlr4/imports/scaling/RDLStatement.g4
@@ -19,27 +19,27 @@ grammar RDLStatement;
import Keyword, Literals, Symbol, BaseRule;
-createShardingScaling
- : CREATE SHARDING SCALING scalingName scalingDefinition?
+createShardingScalingRule
+ : CREATE SHARDING SCALING RULE scalingName scalingRuleDefinition?
;
-dropShardingScaling
- : DROP SHARDING SCALING scalingName
+dropShardingScalingRule
+ : DROP SHARDING SCALING RULE scalingName
;
-enableShardingScaling
- : ENABLE SHARDING SCALING scalingName
+enableShardingScalingRule
+ : ENABLE SHARDING SCALING RULE scalingName
;
-disableShardingScaling
- : DISABLE SHARDING SCALING scalingName
+disableShardingScalingRule
+ : DISABLE SHARDING SCALING RULE scalingName
;
scalingName
: IDENTIFIER
;
-scalingDefinition
+scalingRuleDefinition
: minimumAutoDefinition | completeAutoDefinition | manualDefinition
;
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/antlr4/scaling/org/apache/shardingsphere/distsql/parser/autogen/ScalingStatement.g4
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/antlr4/scaling/org/apache/shardingsphere/distsql/parser/autogen/ScalingStatement.g4
index e6d8e28..b9faac4 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/antlr4/scaling/org/apache/shardingsphere/distsql/parser/autogen/ScalingStatement.g4
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/antlr4/scaling/org/apache/shardingsphere/distsql/parser/autogen/ScalingStatement.g4
@@ -30,9 +30,9 @@ execute
| showScalingCheckAlgorithms
| stopScalingSourceWriting
| applyScaling
- | createShardingScaling
- | dropShardingScaling
- | enableShardingScaling
- | disableShardingScaling
+ | createShardingScalingRule
+ | dropShardingScalingRule
+ | enableShardingScalingRule
+ | disableShardingScalingRule
) SEMI?
;
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/java/org/apache/shardingsphere/scaling/distsql/parser/core/ScalingSQLStatementVisitor.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/java/org/apache/shardingsphere/scaling/distsql/parser/core/ScalingSQLStatementVisitor.java
index 93372cf..657531a 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/java/org/apache/shardingsphere/scaling/distsql/parser/core/ScalingSQLStatementVisitor.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/java/org/apache/shardingsphere/scaling/distsql/parser/core/ScalingSQLStatementVisitor.java
@@ -24,19 +24,19 @@ import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.C
import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.ApplyScalingContext;
import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.CompleteAutoDefinitionContext;
import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.CompletionDetectorContext;
-import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.CreateShardingScalingContext;
+import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.CreateShardingScalingRuleContext;
import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.DataConsistencyCheckerContext;
-import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.DisableShardingScalingContext;
+import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.DisableShardingScalingRuleContext;
import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.DropScalingContext;
-import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.DropShardingScalingContext;
-import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.EnableShardingScalingContext;
+import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.DropShardingScalingRuleContext;
+import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.EnableShardingScalingRuleContext;
import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.InputDefinitionContext;
import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.ManualDefinitionContext;
import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.MinimumAutoDefinitionContext;
import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.OutputDefinitionContext;
import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.RateLimiterContext;
import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.ResetScalingContext;
-import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.ScalingDefinitionContext;
+import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.ScalingRuleDefinitionContext;
import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.ShowScalingCheckAlgorithmsContext;
import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.ShowScalingListContext;
import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.ShowScalingStatusContext;
@@ -47,11 +47,11 @@ import
org.apache.shardingsphere.distsql.parser.autogen.ScalingStatementParser.S
import org.apache.shardingsphere.distsql.parser.segment.AlgorithmSegment;
import
org.apache.shardingsphere.scaling.distsql.statement.CheckScalingStatement;
import
org.apache.shardingsphere.scaling.distsql.statement.ApplyScalingStatement;
-import
org.apache.shardingsphere.scaling.distsql.statement.CreateShardingScalingStatement;
-import
org.apache.shardingsphere.scaling.distsql.statement.DisableShardingScalingStatement;
+import
org.apache.shardingsphere.scaling.distsql.statement.CreateShardingScalingRuleStatement;
+import
org.apache.shardingsphere.scaling.distsql.statement.DisableShardingScalingRuleStatement;
import
org.apache.shardingsphere.scaling.distsql.statement.DropScalingStatement;
-import
org.apache.shardingsphere.scaling.distsql.statement.DropShardingScalingStatement;
-import
org.apache.shardingsphere.scaling.distsql.statement.EnableShardingScalingStatement;
+import
org.apache.shardingsphere.scaling.distsql.statement.DropShardingScalingRuleStatement;
+import
org.apache.shardingsphere.scaling.distsql.statement.EnableShardingScalingRuleStatement;
import
org.apache.shardingsphere.scaling.distsql.statement.ResetScalingStatement;
import
org.apache.shardingsphere.scaling.distsql.statement.ShowScalingCheckAlgorithmsStatement;
import
org.apache.shardingsphere.scaling.distsql.statement.ShowScalingListStatement;
@@ -60,7 +60,7 @@ import
org.apache.shardingsphere.scaling.distsql.statement.StartScalingStatement
import
org.apache.shardingsphere.scaling.distsql.statement.StopScalingSourceWritingStatement;
import
org.apache.shardingsphere.scaling.distsql.statement.StopScalingStatement;
import
org.apache.shardingsphere.scaling.distsql.statement.segment.InputOrOutputSegment;
-import
org.apache.shardingsphere.scaling.distsql.statement.segment.ShardingScalingConfigurationSegment;
+import
org.apache.shardingsphere.scaling.distsql.statement.segment.ShardingScalingRuleConfigurationSegment;
import org.apache.shardingsphere.sql.parser.api.visitor.ASTNode;
import org.apache.shardingsphere.sql.parser.api.visitor.SQLVisitor;
import
org.apache.shardingsphere.sql.parser.sql.common.value.identifier.IdentifierValue;
@@ -127,30 +127,30 @@ public final class ScalingSQLStatementVisitor extends
ScalingStatementBaseVisito
}
@Override
- public ASTNode visitCreateShardingScaling(final
CreateShardingScalingContext ctx) {
- CreateShardingScalingStatement result = new
CreateShardingScalingStatement(new
IdentifierValue(ctx.scalingName().getText()).getValue());
- if (null != ctx.scalingDefinition()) {
-
result.setConfigurationSegment((ShardingScalingConfigurationSegment)
visit(ctx.scalingDefinition()));
+ public ASTNode visitCreateShardingScalingRule(final
CreateShardingScalingRuleContext ctx) {
+ CreateShardingScalingRuleStatement result = new
CreateShardingScalingRuleStatement(new
IdentifierValue(ctx.scalingName().getText()).getValue());
+ if (null != ctx.scalingRuleDefinition()) {
+
result.setConfigurationSegment((ShardingScalingRuleConfigurationSegment)
visit(ctx.scalingRuleDefinition()));
}
return result;
}
@Override
- public ASTNode visitScalingDefinition(final ScalingDefinitionContext ctx) {
- ShardingScalingConfigurationSegment result = null;
+ public ASTNode visitScalingRuleDefinition(final
ScalingRuleDefinitionContext ctx) {
+ ShardingScalingRuleConfigurationSegment result = null;
if (null != ctx.minimumAutoDefinition()) {
- result = (ShardingScalingConfigurationSegment)
visit(ctx.minimumAutoDefinition());
+ result = (ShardingScalingRuleConfigurationSegment)
visit(ctx.minimumAutoDefinition());
} else if (null != ctx.completeAutoDefinition()) {
- result = (ShardingScalingConfigurationSegment)
visit(ctx.completeAutoDefinition());
+ result = (ShardingScalingRuleConfigurationSegment)
visit(ctx.completeAutoDefinition());
} else if (null != ctx.manualDefinition()) {
- result = (ShardingScalingConfigurationSegment)
visit(ctx.manualDefinition());
+ result = (ShardingScalingRuleConfigurationSegment)
visit(ctx.manualDefinition());
}
return result;
}
@Override
public ASTNode visitMinimumAutoDefinition(final
MinimumAutoDefinitionContext ctx) {
- ShardingScalingConfigurationSegment result = new
ShardingScalingConfigurationSegment();
+ ShardingScalingRuleConfigurationSegment result = new
ShardingScalingRuleConfigurationSegment();
result.setCompletionDetector((AlgorithmSegment)
visit(ctx.completionDetector()));
result.setDataConsistencyChecker((AlgorithmSegment)
visit(ctx.dataConsistencyChecker()));
return result;
@@ -158,7 +158,7 @@ public final class ScalingSQLStatementVisitor extends
ScalingStatementBaseVisito
@Override
public ASTNode visitCompleteAutoDefinition(final
CompleteAutoDefinitionContext ctx) {
- ShardingScalingConfigurationSegment result = new
ShardingScalingConfigurationSegment();
+ ShardingScalingRuleConfigurationSegment result = new
ShardingScalingRuleConfigurationSegment();
result.setInputSegment((InputOrOutputSegment)
visit(ctx.inputDefinition()));
result.setOutputSegment((InputOrOutputSegment)
visit(ctx.outputDefinition()));
result.setStreamChannel((AlgorithmSegment) visit(ctx.streamChannel()));
@@ -169,7 +169,7 @@ public final class ScalingSQLStatementVisitor extends
ScalingStatementBaseVisito
@Override
public ASTNode visitManualDefinition(final ManualDefinitionContext ctx) {
- ShardingScalingConfigurationSegment result = new
ShardingScalingConfigurationSegment();
+ ShardingScalingRuleConfigurationSegment result = new
ShardingScalingRuleConfigurationSegment();
result.setInputSegment((InputOrOutputSegment)
visit(ctx.inputDefinition()));
result.setOutputSegment((InputOrOutputSegment)
visit(ctx.outputDefinition()));
result.setStreamChannel((AlgorithmSegment) visit(ctx.streamChannel()));
@@ -213,18 +213,18 @@ public final class ScalingSQLStatementVisitor extends
ScalingStatementBaseVisito
}
@Override
- public ASTNode visitDropShardingScaling(final DropShardingScalingContext
ctx) {
- return new DropShardingScalingStatement(new
IdentifierValue(ctx.scalingName().getText()).getValue());
+ public ASTNode visitDropShardingScalingRule(final
DropShardingScalingRuleContext ctx) {
+ return new DropShardingScalingRuleStatement(new
IdentifierValue(ctx.scalingName().getText()).getValue());
}
@Override
- public ASTNode visitEnableShardingScaling(final
EnableShardingScalingContext ctx) {
- return new EnableShardingScalingStatement(new
IdentifierValue(ctx.scalingName().getText()).getValue());
+ public ASTNode visitEnableShardingScalingRule(final
EnableShardingScalingRuleContext ctx) {
+ return new EnableShardingScalingRuleStatement(new
IdentifierValue(ctx.scalingName().getText()).getValue());
}
@Override
- public ASTNode visitDisableShardingScaling(final
DisableShardingScalingContext ctx) {
- return new DisableShardingScalingStatement(new
IdentifierValue(ctx.scalingName().getText()).getValue());
+ public ASTNode visitDisableShardingScalingRule(final
DisableShardingScalingRuleContext ctx) {
+ return new DisableShardingScalingRuleStatement(new
IdentifierValue(ctx.scalingName().getText()).getValue());
}
@Override
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/CreateShardingScalingStatement.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/CreateShardingScalingRuleStatement.java
similarity index 83%
rename from
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/CreateShardingScalingStatement.java
rename to
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/CreateShardingScalingRuleStatement.java
index 7443f16..f0e351f 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/CreateShardingScalingStatement.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/CreateShardingScalingRuleStatement.java
@@ -21,17 +21,17 @@ import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import
org.apache.shardingsphere.distsql.parser.statement.rdl.create.CreateRuleStatement;
-import
org.apache.shardingsphere.scaling.distsql.statement.segment.ShardingScalingConfigurationSegment;
+import
org.apache.shardingsphere.scaling.distsql.statement.segment.ShardingScalingRuleConfigurationSegment;
/**
- * Create sharding scaling statement.
+ * Create sharding scaling rule statement.
*/
@RequiredArgsConstructor
@Getter
@Setter
-public final class CreateShardingScalingStatement extends CreateRuleStatement {
+public final class CreateShardingScalingRuleStatement extends
CreateRuleStatement {
private final String scalingName;
- private ShardingScalingConfigurationSegment configurationSegment;
+ private ShardingScalingRuleConfigurationSegment configurationSegment;
}
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/EnableShardingScalingStatement.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/DisableShardingScalingRuleStatement.java
similarity index 89%
rename from
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/EnableShardingScalingStatement.java
rename to
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/DisableShardingScalingRuleStatement.java
index ce3f233..a128303 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/EnableShardingScalingStatement.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/DisableShardingScalingRuleStatement.java
@@ -22,11 +22,11 @@ import lombok.RequiredArgsConstructor;
import
org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterRuleStatement;
/**
- * Enable sharding scaling statement.
+ * Disable sharding scaling rule statement.
*/
@RequiredArgsConstructor
@Getter
-public final class EnableShardingScalingStatement extends AlterRuleStatement {
+public final class DisableShardingScalingRuleStatement extends
AlterRuleStatement {
private final String scalingName;
}
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/DropShardingScalingStatement.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/DropShardingScalingRuleStatement.java
similarity index 90%
rename from
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/DropShardingScalingStatement.java
rename to
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/DropShardingScalingRuleStatement.java
index 3577453..28f0104 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/DropShardingScalingStatement.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/DropShardingScalingRuleStatement.java
@@ -22,11 +22,11 @@ import lombok.RequiredArgsConstructor;
import
org.apache.shardingsphere.distsql.parser.statement.rdl.drop.DropRuleStatement;
/**
- * Drop sharding scaling statement.
+ * Drop sharding scaling rule statement.
*/
@RequiredArgsConstructor
@Getter
-public final class DropShardingScalingStatement extends DropRuleStatement {
+public final class DropShardingScalingRuleStatement extends DropRuleStatement {
private final String scalingName;
}
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/DisableShardingScalingStatement.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/EnableShardingScalingRuleStatement.java
similarity index 89%
rename from
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/DisableShardingScalingStatement.java
rename to
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/EnableShardingScalingRuleStatement.java
index 56db23c..6470b9a 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/DisableShardingScalingStatement.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/EnableShardingScalingRuleStatement.java
@@ -22,11 +22,11 @@ import lombok.RequiredArgsConstructor;
import
org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterRuleStatement;
/**
- * Disable sharding scaling statement.
+ * Enable sharding scaling rule statement.
*/
@RequiredArgsConstructor
@Getter
-public final class DisableShardingScalingStatement extends AlterRuleStatement {
+public final class EnableShardingScalingRuleStatement extends
AlterRuleStatement {
private final String scalingName;
}
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/segment/ShardingScalingConfigurationSegment.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/segment/ShardingScalingRuleConfigurationSegment.java
similarity index 91%
rename from
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/segment/ShardingScalingConfigurationSegment.java
rename to
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/segment/ShardingScalingRuleConfigurationSegment.java
index 6fc42c7..6175b3a 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/segment/ShardingScalingConfigurationSegment.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-statement/src/main/java/org/apache/shardingsphere/scaling/distsql/statement/segment/ShardingScalingRuleConfigurationSegment.java
@@ -23,11 +23,11 @@ import
org.apache.shardingsphere.distsql.parser.segment.AlgorithmSegment;
import org.apache.shardingsphere.sql.parser.api.visitor.ASTNode;
/**
- * Sharding scaling configuration segment.
+ * Sharding scaling rule configuration segment.
*/
@Getter
@Setter
-public final class ShardingScalingConfigurationSegment implements ASTNode {
+public final class ShardingScalingRuleConfigurationSegment implements ASTNode {
private InputOrOutputSegment inputSegment;
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/AlterRuleStatementAssert.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/AlterRuleStatementAssert.java
index 19dc0a2..d516a4f 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/AlterRuleStatementAssert.java
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/AlterRuleStatementAssert.java
@@ -24,8 +24,8 @@ import
org.apache.shardingsphere.distsql.parser.statement.rdl.alter.AlterRuleSta
import
org.apache.shardingsphere.distsql.parser.statement.rdl.create.AlterDefaultSingleTableRuleStatement;
import
org.apache.shardingsphere.encrypt.distsql.parser.statement.AlterEncryptRuleStatement;
import
org.apache.shardingsphere.readwritesplitting.distsql.parser.statement.AlterReadwriteSplittingRuleStatement;
-import
org.apache.shardingsphere.scaling.distsql.statement.DisableShardingScalingStatement;
-import
org.apache.shardingsphere.scaling.distsql.statement.EnableShardingScalingStatement;
+import
org.apache.shardingsphere.scaling.distsql.statement.DisableShardingScalingRuleStatement;
+import
org.apache.shardingsphere.scaling.distsql.statement.EnableShardingScalingRuleStatement;
import
org.apache.shardingsphere.shadow.distsql.parser.statement.AlterShadowAlgorithmStatement;
import
org.apache.shardingsphere.shadow.distsql.parser.statement.AlterShadowRuleStatement;
import
org.apache.shardingsphere.sharding.distsql.parser.statement.AlterDefaultShardingStrategyStatement;
@@ -47,8 +47,8 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.distsql.rdl.alter.impl.AlterShardingBroadcastTableRulesStatementAssert;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.distsql.rdl.alter.impl.AlterShardingKeyGeneratorStatementAssert;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.distsql.rdl.alter.impl.AlterShardingTableRuleStatementAssert;
-import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.distsql.rdl.alter.impl.DisableShardingScalingStatementAssert;
-import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.distsql.rdl.alter.impl.EnableShardingScalingStatementAssert;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.distsql.rdl.alter.impl.DisableShardingScalingRuleStatementAssert;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.distsql.rdl.alter.impl.EnableShardingScalingRuleStatementAssert;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.SQLParserTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.alter.AlterDatabaseDiscoveryHeartbeatStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.alter.AlterDatabaseDiscoveryTypeStatementTestCase;
@@ -61,8 +61,8 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.alter.AlterShardingBindingTableRulesStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.alter.AlterShardingBroadcastTableRulesStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.alter.AlterShardingKeyGeneratorStatementTestCase;
-import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.alter.DisableShardingScalingStatementTestCase;
-import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.alter.EnableShardingScalingStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.alter.DisableShardingScalingRuleStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.alter.EnableShardingScalingRuleStatementTestCase;
/**
* Alter rule statement assert.
@@ -105,10 +105,10 @@ public final class AlterRuleStatementAssert {
(AlterDefaultSingleTableRuleStatementTestCase) expected);
} else if (actual instanceof AlterShardingKeyGeneratorStatement) {
AlterShardingKeyGeneratorStatementAssert.assertIs(assertContext,
(AlterShardingKeyGeneratorStatement) actual,
(AlterShardingKeyGeneratorStatementTestCase) expected);
- } else if (actual instanceof EnableShardingScalingStatement) {
- EnableShardingScalingStatementAssert.assertIs(assertContext,
(EnableShardingScalingStatement) actual,
(EnableShardingScalingStatementTestCase) expected);
- } else if (actual instanceof DisableShardingScalingStatement) {
- DisableShardingScalingStatementAssert.assertIs(assertContext,
(DisableShardingScalingStatement) actual,
(DisableShardingScalingStatementTestCase) expected);
+ } else if (actual instanceof EnableShardingScalingRuleStatement) {
+ EnableShardingScalingRuleStatementAssert.assertIs(assertContext,
(EnableShardingScalingRuleStatement) actual,
(EnableShardingScalingRuleStatementTestCase) expected);
+ } else if (actual instanceof DisableShardingScalingRuleStatement) {
+ DisableShardingScalingRuleStatementAssert.assertIs(assertContext,
(DisableShardingScalingRuleStatement) actual,
(DisableShardingScalingRuleStatementTestCase) expected);
}
}
}
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/DisableShardingScalingStatementAssert.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/DisableShardingScalingRuleStatementAssert.java
similarity index 79%
rename from
shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/DisableShardingScalingStatementAssert.java
rename to
shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/DisableShardingScalingRuleStatementAssert.java
index eb5b2e4..d6d8ab1 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/DisableShardingScalingStatementAssert.java
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/DisableShardingScalingRuleStatementAssert.java
@@ -19,9 +19,9 @@ package
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statemen
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
-import
org.apache.shardingsphere.scaling.distsql.statement.DisableShardingScalingStatement;
+import
org.apache.shardingsphere.scaling.distsql.statement.DisableShardingScalingRuleStatement;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.SQLCaseAssertContext;
-import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.alter.DisableShardingScalingStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.alter.DisableShardingScalingRuleStatementTestCase;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertNotNull;
@@ -29,19 +29,19 @@ import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
/**
- * Disable sharding scaling statement assert.
+ * Disable sharding scaling rule statement assert.
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public final class DisableShardingScalingStatementAssert {
+public final class DisableShardingScalingRuleStatementAssert {
/**
- * Assert disable sharding scaling statement is correct with expected
parser result.
+ * Assert disable sharding scaling rule statement is correct with expected
parser result.
*
* @param assertContext assert context
- * @param actual actual disable sharding scaling statement
- * @param expected expected disable sharding scaling statement test case
+ * @param actual actual disable sharding scaling rule statement
+ * @param expected expected disable sharding scaling rule statement test
case
*/
- public static void assertIs(final SQLCaseAssertContext assertContext,
final DisableShardingScalingStatement actual, final
DisableShardingScalingStatementTestCase expected) {
+ public static void assertIs(final SQLCaseAssertContext assertContext,
final DisableShardingScalingRuleStatement actual, final
DisableShardingScalingRuleStatementTestCase expected) {
if (null == expected) {
assertNull(assertContext.getText("Actual statement should not
exist."), actual);
} else {
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/EnableShardingScalingStatementAssert.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/EnableShardingScalingRuleStatementAssert.java
similarity index 79%
rename from
shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/EnableShardingScalingStatementAssert.java
rename to
shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/EnableShardingScalingRuleStatementAssert.java
index fc2fea3..6a9f063 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/EnableShardingScalingStatementAssert.java
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/alter/impl/EnableShardingScalingRuleStatementAssert.java
@@ -19,9 +19,9 @@ package
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statemen
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
-import
org.apache.shardingsphere.scaling.distsql.statement.EnableShardingScalingStatement;
+import
org.apache.shardingsphere.scaling.distsql.statement.EnableShardingScalingRuleStatement;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.SQLCaseAssertContext;
-import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.alter.EnableShardingScalingStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.alter.EnableShardingScalingRuleStatementTestCase;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertNotNull;
@@ -29,19 +29,19 @@ import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
/**
- * Enable sharding scaling statement assert.
+ * Enable sharding scaling rule statement assert.
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public final class EnableShardingScalingStatementAssert {
+public final class EnableShardingScalingRuleStatementAssert {
/**
- * Assert enable sharding scaling statement is correct with expected
parser result.
+ * Assert enable sharding scaling rule statement is correct with expected
parser result.
*
* @param assertContext assert context
- * @param actual actual enable sharding scaling statement
- * @param expected expected enable sharding scaling statement test case
+ * @param actual actual enable sharding scaling rule statement
+ * @param expected expected enable sharding scaling rule statement test
case
*/
- public static void assertIs(final SQLCaseAssertContext assertContext,
final EnableShardingScalingStatement actual, final
EnableShardingScalingStatementTestCase expected) {
+ public static void assertIs(final SQLCaseAssertContext assertContext,
final EnableShardingScalingRuleStatement actual, final
EnableShardingScalingRuleStatementTestCase expected) {
if (null == expected) {
assertNull(assertContext.getText("Actual statement should not
exist."), actual);
} else {
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/CreateRuleStatementAssert.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/CreateRuleStatementAssert.java
index 56fd8b8..ab1a959 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/CreateRuleStatementAssert.java
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/CreateRuleStatementAssert.java
@@ -26,7 +26,7 @@ import
org.apache.shardingsphere.distsql.parser.statement.rdl.create.CreateDefau
import
org.apache.shardingsphere.distsql.parser.statement.rdl.create.CreateRuleStatement;
import
org.apache.shardingsphere.encrypt.distsql.parser.statement.CreateEncryptRuleStatement;
import
org.apache.shardingsphere.readwritesplitting.distsql.parser.statement.CreateReadwriteSplittingRuleStatement;
-import
org.apache.shardingsphere.scaling.distsql.statement.CreateShardingScalingStatement;
+import
org.apache.shardingsphere.scaling.distsql.statement.CreateShardingScalingRuleStatement;
import
org.apache.shardingsphere.shadow.distsql.parser.statement.CreateDefaultShadowAlgorithmStatement;
import
org.apache.shardingsphere.shadow.distsql.parser.statement.CreateShadowAlgorithmStatement;
import
org.apache.shardingsphere.shadow.distsql.parser.statement.CreateShadowRuleStatement;
@@ -51,7 +51,7 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.distsql.rdl.create.impl.CreateShardingBindingTableRulesStatementAssert;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.distsql.rdl.create.impl.CreateShardingBroadcastTableRulesStatementAssert;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.distsql.rdl.create.impl.CreateShardingKeyGeneratorStatementAssert;
-import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.distsql.rdl.create.impl.CreateShardingScalingStatementAssert;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.distsql.rdl.create.impl.CreateShardingScalingRuleStatementAssert;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.distsql.rdl.create.impl.CreateShardingTableRuleStatementAssert;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.SQLParserTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.create.CreateDatabaseDiscoveryHeartbeatStatementTestCase;
@@ -67,7 +67,7 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.create.CreateShardingBindingTableRulesStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.create.CreateShardingBroadcastTableRulesStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.create.CreateShardingKeyGeneratorStatementTestCase;
-import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.create.CreateShardingScalingStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.create.CreateShardingScalingRuleStatementTestCase;
/**
* Create RDL Statement assert.
@@ -115,8 +115,8 @@ public final class CreateRuleStatementAssert {
(CreateDefaultSingleTableRuleStatementTestCase) expected);
} else if (actual instanceof CreateShardingKeyGeneratorStatement) {
CreateShardingKeyGeneratorStatementAssert.assertIs(assertContext,
(CreateShardingKeyGeneratorStatement) actual,
(CreateShardingKeyGeneratorStatementTestCase) expected);
- } else if (actual instanceof CreateShardingScalingStatement) {
- CreateShardingScalingStatementAssert.assertIs(assertContext,
(CreateShardingScalingStatement) actual,
(CreateShardingScalingStatementTestCase) expected);
+ } else if (actual instanceof CreateShardingScalingRuleStatement) {
+ CreateShardingScalingRuleStatementAssert.assertIs(assertContext,
(CreateShardingScalingRuleStatement) actual,
(CreateShardingScalingRuleStatementTestCase) expected);
}
}
}
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateShardingScalingStatementAssert.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateShardingScalingRuleStatementAssert.java
similarity index 83%
rename from
shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateShardingScalingStatementAssert.java
rename to
shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateShardingScalingRuleStatementAssert.java
index 011007b..29ecc9e 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateShardingScalingStatementAssert.java
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/create/impl/CreateShardingScalingRuleStatementAssert.java
@@ -20,15 +20,15 @@ package
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statemen
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.apache.shardingsphere.distsql.parser.segment.AlgorithmSegment;
-import
org.apache.shardingsphere.scaling.distsql.statement.CreateShardingScalingStatement;
+import
org.apache.shardingsphere.scaling.distsql.statement.CreateShardingScalingRuleStatement;
import
org.apache.shardingsphere.scaling.distsql.statement.segment.InputOrOutputSegment;
-import
org.apache.shardingsphere.scaling.distsql.statement.segment.ShardingScalingConfigurationSegment;
+import
org.apache.shardingsphere.scaling.distsql.statement.segment.ShardingScalingRuleConfigurationSegment;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.SQLCaseAssertContext;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.segment.distsql.PropertiesAssert;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.segment.impl.distsql.ExpectedAlgorithm;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.segment.impl.distsql.rdl.sharding.scaling.ExpectedInputOrOutputSegment;
-import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.segment.impl.distsql.rdl.sharding.scaling.ExpectedShardingScalingConfigurationSegment;
-import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.create.CreateShardingScalingStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.segment.impl.distsql.rdl.sharding.scaling.ExpectedShardingScalingRuleConfigurationSegment;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.create.CreateShardingScalingRuleStatementTestCase;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertNotNull;
@@ -36,35 +36,35 @@ import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
/**
- * Create sharding scaling statement assert.
+ * Create sharding scaling rule statement assert.
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public final class CreateShardingScalingStatementAssert {
+public final class CreateShardingScalingRuleStatementAssert {
/**
- * Assert create sharding scaling statement is correct with expected
parser result.
+ * Assert create sharding scaling rule statement is correct with expected
parser result.
*
* @param assertContext assert context
- * @param actual actual create sharding scaling statement
- * @param expected expected create sharding scaling statement test case
+ * @param actual actual create sharding scaling rule statement
+ * @param expected expected create sharding scaling rule statement test
case
*/
- public static void assertIs(final SQLCaseAssertContext assertContext,
final CreateShardingScalingStatement actual, final
CreateShardingScalingStatementTestCase expected) {
+ public static void assertIs(final SQLCaseAssertContext assertContext,
final CreateShardingScalingRuleStatement actual, final
CreateShardingScalingRuleStatementTestCase expected) {
if (null == expected) {
assertNull(assertContext.getText("Actual statement should not
exist."), actual);
} else {
assertNotNull(assertContext.getText("Actual statement should
exist."), actual);
assertThat(assertContext.getText(String.format("`%s`'s scaling
name assertion error: ", actual.getClass().getSimpleName())),
actual.getScalingName(), is(expected.getScalingName()));
- assertShardingScalingConfiguration(assertContext,
actual.getConfigurationSegment(), expected.getConfigurationSegment());
+ assertShardingScalingRuleConfiguration(assertContext,
actual.getConfigurationSegment(), expected.getConfigurationSegment());
}
}
- private static void assertShardingScalingConfiguration(final
SQLCaseAssertContext assertContext, final ShardingScalingConfigurationSegment
actual,
- final
ExpectedShardingScalingConfigurationSegment expected) {
+ private static void assertShardingScalingRuleConfiguration(final
SQLCaseAssertContext assertContext, final
ShardingScalingRuleConfigurationSegment actual,
+ final
ExpectedShardingScalingRuleConfigurationSegment expected) {
if (null == expected) {
- assertNull(assertContext.getText("Actual sharding scaling
configuration segment should not exist."), actual);
+ assertNull(assertContext.getText("Actual sharding scaling rule
configuration segment should not exist."), actual);
} else {
- assertNotNull(assertContext.getText("Actual sharding scaling
configuration segment should exist."), actual);
+ assertNotNull(assertContext.getText("Actual sharding scaling rule
configuration segment should exist."), actual);
assertInputOrOutputSegment("input", assertContext,
actual.getInputSegment(), expected.getInputSegment());
assertInputOrOutputSegment("output", assertContext,
actual.getOutputSegment(), expected.getOutputSegment());
assertAlgorithmSegment("stream channel", assertContext,
actual.getStreamChannel(), expected.getStreamChannel());
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/drop/DropRuleStatementAssert.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/drop/DropRuleStatementAssert.java
index 335483e..de2303e 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/drop/DropRuleStatementAssert.java
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/drop/DropRuleStatementAssert.java
@@ -26,7 +26,7 @@ import
org.apache.shardingsphere.distsql.parser.statement.rdl.drop.DropDefaultSi
import
org.apache.shardingsphere.distsql.parser.statement.rdl.drop.DropRuleStatement;
import
org.apache.shardingsphere.encrypt.distsql.parser.statement.DropEncryptRuleStatement;
import
org.apache.shardingsphere.readwritesplitting.distsql.parser.statement.DropReadwriteSplittingRuleStatement;
-import
org.apache.shardingsphere.scaling.distsql.statement.DropShardingScalingStatement;
+import
org.apache.shardingsphere.scaling.distsql.statement.DropShardingScalingRuleStatement;
import
org.apache.shardingsphere.shadow.distsql.parser.statement.DropShadowRuleStatement;
import
org.apache.shardingsphere.sharding.distsql.parser.statement.DropDefaultShardingStrategyStatement;
import
org.apache.shardingsphere.sharding.distsql.parser.statement.DropShardingBindingTableRulesStatement;
@@ -43,7 +43,7 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.distsql.rdl.drop.impl.DropShadowRuleStatementAssert;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.distsql.rdl.drop.impl.DropShardingBindingTableRulesStatementAssert;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.distsql.rdl.drop.impl.DropShardingBroadcastTableRulesStatementAssert;
-import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.distsql.rdl.drop.impl.DropShardingScalingStatementAssert;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.distsql.rdl.drop.impl.DropShardingScalingRuleStatementAssert;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statement.distsql.rdl.drop.impl.DropShardingTableRuleStatementAssert;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.SQLParserTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.drop.DropDataBaseDiscoveryHeartbeatStatementTestCase;
@@ -56,7 +56,7 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.drop.DropShadowRuleStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.drop.DropShardingBindingTableRulesStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.drop.DropShardingBroadcastTableRulesStatementTestCase;
-import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.drop.DropShardingScalingStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.drop.DropShardingScalingRuleStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.drop.DropShardingTableRuleStatementTestCase;
/**
@@ -95,8 +95,8 @@ public final class DropRuleStatementAssert {
DropShadowRuleStatementAssert.assertIs(assertContext,
(DropShadowRuleStatement) actual, (DropShadowRuleStatementTestCase) expected);
} else if (actual instanceof DropDefaultSingleTableRuleStatement) {
DropDefaultSingleTableRuleAssert.assertIs(assertContext,
(DropDefaultSingleTableRuleStatement) actual,
(DropDefaultSingleTableRuleStatementTestCase) expected);
- } else if (actual instanceof DropShardingScalingStatement) {
- DropShardingScalingStatementAssert.assertIs(assertContext,
(DropShardingScalingStatement) actual, (DropShardingScalingStatementTestCase)
expected);
+ } else if (actual instanceof DropShardingScalingRuleStatement) {
+ DropShardingScalingRuleStatementAssert.assertIs(assertContext,
(DropShardingScalingRuleStatement) actual,
(DropShardingScalingRuleStatementTestCase) expected);
}
}
}
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/drop/impl/DropShardingScalingStatementAssert.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/drop/impl/DropShardingScalingRuleStatementAssert.java
similarity index 77%
rename from
shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/drop/impl/DropShardingScalingStatementAssert.java
rename to
shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/drop/impl/DropShardingScalingRuleStatementAssert.java
index 92bbd55..c64afce 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/drop/impl/DropShardingScalingStatementAssert.java
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/statement/distsql/rdl/drop/impl/DropShardingScalingRuleStatementAssert.java
@@ -19,9 +19,9 @@ package
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.statemen
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
-import
org.apache.shardingsphere.scaling.distsql.statement.DropShardingScalingStatement;
+import
org.apache.shardingsphere.scaling.distsql.statement.DropShardingScalingRuleStatement;
import
org.apache.shardingsphere.test.sql.parser.parameterized.asserts.SQLCaseAssertContext;
-import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.drop.DropShardingScalingStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.drop.DropShardingScalingRuleStatementTestCase;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertNotNull;
@@ -29,19 +29,19 @@ import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
/**
- * Drop sharding scaling statement assert.
+ * Drop sharding scaling rule statement assert.
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public final class DropShardingScalingStatementAssert {
+public final class DropShardingScalingRuleStatementAssert {
/**
- * Assert drop sharding scaling statement is correct with expected parser
result.
+ * Assert drop sharding scaling rule statement is correct with expected
parser result.
*
* @param assertContext assert context
- * @param actual actual drop sharding scaling statement
- * @param expected expected drop sharding scaling statement test case
+ * @param actual actual drop sharding scaling rule statement
+ * @param expected expected drop sharding scaling rule statement test case
*/
- public static void assertIs(final SQLCaseAssertContext assertContext,
final DropShardingScalingStatement actual, final
DropShardingScalingStatementTestCase expected) {
+ public static void assertIs(final SQLCaseAssertContext assertContext,
final DropShardingScalingRuleStatement actual, final
DropShardingScalingRuleStatementTestCase expected) {
if (null == expected) {
assertNull(assertContext.getText("Actual statement should not
exist."), actual);
} else {
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
index e4d5d3b..b312c02 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
@@ -193,8 +193,8 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.alter.AlterShardingBroadcastTableRulesStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.alter.AlterShardingKeyGeneratorStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.alter.AlterShardingTableRuleStatementTestCase;
-import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.alter.DisableShardingScalingStatementTestCase;
-import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.alter.EnableShardingScalingStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.alter.DisableShardingScalingRuleStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.alter.EnableShardingScalingRuleStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.create.AddResourceStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.create.CreateDatabaseDiscoveryConstructionRuleStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.create.CreateDatabaseDiscoveryDefinitionRuleStatementTestCase;
@@ -212,7 +212,7 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.create.CreateShardingBindingTableRulesStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.create.CreateShardingBroadcastTableRulesStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.create.CreateShardingKeyGeneratorStatementTestCase;
-import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.create.CreateShardingScalingStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.create.CreateShardingScalingRuleStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.create.CreateShardingTableRuleStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.drop.DropDataBaseDiscoveryHeartbeatStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.drop.DropDataBaseDiscoveryRuleStatementTestCase;
@@ -227,7 +227,7 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.drop.DropShardingBindingTableRulesStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.drop.DropShardingBroadcastTableRulesStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.drop.DropShardingKeyGeneratorStatementTestCase;
-import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.drop.DropShardingScalingStatementTestCase;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.drop.DropShardingScalingRuleStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.drop.DropShardingTableRuleStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rql.ShowDataBaseDiscoveryRulesStatementTestCase;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rql.ShowDefaultShardingStrategyStatementTestCase;
@@ -718,17 +718,17 @@ public final class SQLParserTestCases {
@XmlElement(name = "apply-scaling")
private final List<ApplyScalingStatementTestCase>
applyScalingStatementTestCases = new LinkedList<>();
- @XmlElement(name = "create-sharding-scaling")
- private final List<CreateShardingScalingStatementTestCase>
createShardingScalingStatementTestCases = new LinkedList<>();
+ @XmlElement(name = "create-sharding-scaling-rule")
+ private final List<CreateShardingScalingRuleStatementTestCase>
createShardingScalingRuleStatementTestCases = new LinkedList<>();
- @XmlElement(name = "drop-sharding-scaling")
- private final List<DropShardingScalingStatementTestCase>
dropShardingScalingStatementTestCases = new LinkedList<>();
+ @XmlElement(name = "drop-sharding-scaling-rule")
+ private final List<DropShardingScalingRuleStatementTestCase>
dropShardingScalingRuleStatementTestCases = new LinkedList<>();
- @XmlElement(name = "enable-sharding-scaling")
- private final List<EnableShardingScalingStatementTestCase>
enableShardingScalingStatementTestCases = new LinkedList<>();
+ @XmlElement(name = "enable-sharding-scaling-rule")
+ private final List<EnableShardingScalingRuleStatementTestCase>
enableShardingScalingRuleStatementTestCases = new LinkedList<>();
- @XmlElement(name = "disable-sharding-scaling")
- private final List<DisableShardingScalingStatementTestCase>
disableShardingScalingStatementTestCases = new LinkedList<>();
+ @XmlElement(name = "disable-sharding-scaling-rule")
+ private final List<DisableShardingScalingRuleStatementTestCase>
disableShardingScalingRuleStatementTestCases = new LinkedList<>();
@XmlElement(name = "preview-sql")
private final List<PreviewStatementTestCase> previewStatementTestCase =
new LinkedList<>();
@@ -1155,10 +1155,10 @@ public final class SQLParserTestCases {
putAll(showScalingCheckAlgorithmsStatementTestCase, result);
putAll(stopScalingSourceWritingStatementTestCase, result);
putAll(applyScalingStatementTestCases, result);
- putAll(createShardingScalingStatementTestCases, result);
- putAll(dropShardingScalingStatementTestCases, result);
- putAll(enableShardingScalingStatementTestCases, result);
- putAll(disableShardingScalingStatementTestCases, result);
+ putAll(createShardingScalingRuleStatementTestCases, result);
+ putAll(dropShardingScalingRuleStatementTestCases, result);
+ putAll(enableShardingScalingRuleStatementTestCases, result);
+ putAll(disableShardingScalingRuleStatementTestCases, result);
putAll(showVariableStatementTestCase, result);
putAll(showAllVariablesStatementTestCase, result);
putAll(setVariableStatementTestCase, result);
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/rdl/sharding/scaling/ExpectedShardingScalingConfigurationSegment.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/rdl/sharding/scaling/ExpectedShardingScalingRuleConfigurationSegment.java
similarity index 91%
rename from
shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/rdl/sharding/scaling/ExpectedShardingScalingConfigurationSegment.java
rename to
shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/rdl/sharding/scaling/ExpectedShardingScalingRuleConfigurationSegment.java
index 1a3bc03..68b1d25 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/rdl/sharding/scaling/ExpectedShardingScalingConfigurationSegment.java
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/segment/impl/distsql/rdl/sharding/scaling/ExpectedShardingScalingRuleConfigurationSegment.java
@@ -25,11 +25,11 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
import javax.xml.bind.annotation.XmlElement;
/**
- * Expected sharding scaling configuration segment.
+ * Expected sharding scaling rule configuration segment.
*/
@Getter
@Setter
-public final class ExpectedShardingScalingConfigurationSegment extends
AbstractExpectedIdentifierSQLSegment {
+public final class ExpectedShardingScalingRuleConfigurationSegment extends
AbstractExpectedIdentifierSQLSegment {
@XmlElement(name = "input-segment")
private ExpectedInputOrOutputSegment inputSegment;
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/alter/DisableShardingScalingStatementTestCase.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/alter/DisableShardingScalingRuleStatementTestCase.java
similarity index 89%
rename from
shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/alter/DisableShardingScalingStatementTestCase.java
rename to
shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/alter/DisableShardingScalingRuleStatementTestCase.java
index a2840a3..fc2c4a4 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/alter/DisableShardingScalingStatementTestCase.java
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/alter/DisableShardingScalingRuleStatementTestCase.java
@@ -24,11 +24,11 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
import javax.xml.bind.annotation.XmlAttribute;
/**
- * Disable sharding scaling statement test case.
+ * Disable sharding scaling rule statement test case.
*/
@Getter
@Setter
-public final class DisableShardingScalingStatementTestCase extends
SQLParserTestCase {
+public final class DisableShardingScalingRuleStatementTestCase extends
SQLParserTestCase {
@XmlAttribute(name = "scaling-name")
private String scalingName;
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/alter/EnableShardingScalingStatementTestCase.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/alter/EnableShardingScalingRuleStatementTestCase.java
similarity index 89%
rename from
shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/alter/EnableShardingScalingStatementTestCase.java
rename to
shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/alter/EnableShardingScalingRuleStatementTestCase.java
index 80fcfea..acf0aad 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/alter/EnableShardingScalingStatementTestCase.java
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/alter/EnableShardingScalingRuleStatementTestCase.java
@@ -24,11 +24,11 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
import javax.xml.bind.annotation.XmlAttribute;
/**
- * Enable sharding scaling statement test case.
+ * Enable sharding scaling rule statement test case.
*/
@Getter
@Setter
-public final class EnableShardingScalingStatementTestCase extends
SQLParserTestCase {
+public final class EnableShardingScalingRuleStatementTestCase extends
SQLParserTestCase {
@XmlAttribute(name = "scaling-name")
private String scalingName;
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/create/CreateShardingScalingStatementTestCase.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/create/CreateShardingScalingRuleStatementTestCase.java
similarity index 84%
rename from
shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/create/CreateShardingScalingStatementTestCase.java
rename to
shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/create/CreateShardingScalingRuleStatementTestCase.java
index 1bd6d4b..ebaa974 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/create/CreateShardingScalingStatementTestCase.java
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/create/CreateShardingScalingRuleStatementTestCase.java
@@ -19,22 +19,22 @@ package
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domai
import lombok.Getter;
import lombok.Setter;
-import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.segment.impl.distsql.rdl.sharding.scaling.ExpectedShardingScalingConfigurationSegment;
+import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.segment.impl.distsql.rdl.sharding.scaling.ExpectedShardingScalingRuleConfigurationSegment;
import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.SQLParserTestCase;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
/**
- * Create sharding scaling statement test case.
+ * Create sharding scaling rule statement test case.
*/
@Getter
@Setter
-public final class CreateShardingScalingStatementTestCase extends
SQLParserTestCase {
+public final class CreateShardingScalingRuleStatementTestCase extends
SQLParserTestCase {
@XmlAttribute(name = "scaling-name")
private String scalingName;
@XmlElement(name = "configuration")
- private ExpectedShardingScalingConfigurationSegment configurationSegment;
+ private ExpectedShardingScalingRuleConfigurationSegment
configurationSegment;
}
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/drop/DropShardingScalingStatementTestCase.java
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/drop/DropShardingScalingRuleStatementTestCase.java
similarity index 89%
rename from
shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/drop/DropShardingScalingStatementTestCase.java
rename to
shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/drop/DropShardingScalingRuleStatementTestCase.java
index 86d576f..137da1a 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/drop/DropShardingScalingStatementTestCase.java
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/rdl/drop/DropShardingScalingRuleStatementTestCase.java
@@ -24,11 +24,11 @@ import
org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain
import javax.xml.bind.annotation.XmlAttribute;
/**
- * Drop sharding scaling statement test case.
+ * Drop sharding scaling rule statement test case.
*/
@Getter
@Setter
-public final class DropShardingScalingStatementTestCase extends
SQLParserTestCase {
+public final class DropShardingScalingRuleStatementTestCase extends
SQLParserTestCase {
@XmlAttribute(name = "scaling-name")
private String scalingName;
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/rdl/alter.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/rdl/alter.xml
index effc5d4..c26e89a 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/rdl/alter.xml
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/rdl/alter.xml
@@ -311,6 +311,6 @@
</strategy>
</alter-default-sharding-strategy>
- <enable-sharding-scaling sql-case-id="enable-sharding-scaling"
scaling-name="scalingName"/>
- <disable-sharding-scaling sql-case-id="disable-sharding-scaling"
scaling-name="scalingName"/>
+ <enable-sharding-scaling-rule sql-case-id="enable-sharding-scaling-rule"
scaling-name="scalingName"/>
+ <disable-sharding-scaling-rule sql-case-id="disable-sharding-scaling-rule"
scaling-name="scalingName"/>
</sql-parser-test-cases>
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/rdl/create.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/rdl/create.xml
index 8cb6a88..dbb62b6 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/rdl/create.xml
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/rdl/create.xml
@@ -452,9 +452,9 @@
</shardingKeyGenerator>
</create-sharding-key-generator>
- <create-sharding-scaling
sql-case-id="create-sharding-scaling-without-configuration"
scaling-name="default_scaling"/>
+ <create-sharding-scaling-rule
sql-case-id="create-sharding-scaling-rule-without-configuration"
scaling-name="default_scaling"/>
- <create-sharding-scaling
sql-case-id="create-sharding-scaling-with-minimal-auto-configuration"
scaling-name="default_scaling">
+ <create-sharding-scaling-rule
sql-case-id="create-sharding-scaling-rule-with-minimal-auto-configuration"
scaling-name="default_scaling">
<configuration>
<completion-detector algorithm-name="IDLE">
<properties>
@@ -467,9 +467,9 @@
</properties>
</data-consistency-checker>
</configuration>
- </create-sharding-scaling>
+ </create-sharding-scaling-rule>
- <create-sharding-scaling
sql-case-id="create-sharding-scaling-with-complete-auto-configuration"
scaling-name="default_scaling">
+ <create-sharding-scaling-rule
sql-case-id="create-sharding-scaling-rule-with-complete-auto-configuration"
scaling-name="default_scaling">
<configuration>
<input-segment worker-thread="40" batch-size="1000">
<rate-limiter algorithm-name="QPS">
@@ -501,9 +501,9 @@
</properties>
</data-consistency-checker>
</configuration>
- </create-sharding-scaling>
+ </create-sharding-scaling-rule>
- <create-sharding-scaling
sql-case-id="create-sharding-scaling-with-manual-configuration"
scaling-name="default_scaling">
+ <create-sharding-scaling-rule
sql-case-id="create-sharding-scaling-rule-with-manual-configuration"
scaling-name="default_scaling">
<configuration>
<input-segment worker-thread="40" batch-size="1000">
<rate-limiter algorithm-name="QPS">
@@ -525,5 +525,5 @@
</properties>
</stream-channel>
</configuration>
- </create-sharding-scaling>
+ </create-sharding-scaling-rule>
</sql-parser-test-cases>
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/rdl/drop.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/rdl/drop.xml
index 25296fa..d256743 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/rdl/drop.xml
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case/rdl/drop.xml
@@ -86,5 +86,5 @@
<drop-default-sharding-strategy
sql-case-id="drop-default-sharding-strategy" type="table"/>
- <drop-sharding-scaling sql-case-id="drop-sharding-scaling"
scaling-name="default_scaling"/>
+ <drop-sharding-scaling-rule sql-case-id="drop-sharding-scaling-rule"
scaling-name="default_scaling"/>
</sql-parser-test-cases>
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/rdl/alter.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/rdl/alter.xml
index 5293f99..a95b85b 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/rdl/alter.xml
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/rdl/alter.xml
@@ -47,6 +47,6 @@
<distsql-case id="alter-sharding-key-generator" value="ALTER SHARDING KEY
GENERATOR uuid_key_generator(TYPE(NAME=uuid,PROPERTIES('worker-id' = '123')))"
/>
<distsql-case id="alter-default-sharding-strategy" value="ALTER DEFAULT
SHARDING TABLE STRATEGY(TYPE=standard, SHARDING_COLUMN=order_id,
SHARDING_ALGORITHM=algorithms_name)" />
<distsql-case id="alter-default-sharding-strategy-complex" value="ALTER
DEFAULT SHARDING TABLE STRATEGY(TYPE=complex,
SHARDING_COLUMNS=order_id,user_id, SHARDING_ALGORITHM=algorithms_name)" />
- <distsql-case id="enable-sharding-scaling" value="ENABLE SHARDING SCALING
scalingName" />
- <distsql-case id="disable-sharding-scaling" value="DISABLE SHARDING
SCALING scalingName" />
+ <distsql-case id="enable-sharding-scaling-rule" value="ENABLE SHARDING
SCALING RULE scalingName" />
+ <distsql-case id="disable-sharding-scaling-rule" value="DISABLE SHARDING
SCALING RULE scalingName" />
</sql-cases>
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/rdl/create.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/rdl/create.xml
index 6289206..f934c2b 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/rdl/create.xml
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/rdl/create.xml
@@ -60,8 +60,8 @@
<distsql-case id="create-encrypt-rule-with-query-with-cipher-column"
value="CREATE ENCRYPT RULE `encrypt` (RESOURCE=ds_1,
COLUMNS((NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,TYPE(NAME=AES,PROPERTIES('aes-key-value'='123456abc')))),QUERY_WITH_CIPHER_COLUMN=false)"
/>
<distsql-case id="create-shadow-rule-with-quota" value="CREATE SHADOW RULE
`shadow_rule`(SOURCE=demo_ds,SHADOW=demo_ds_shadow,t_order((TYPE(NAME=COLUMN_REGEX_MATCH,PROPERTIES('operation'='insert','column'='user_id','regex'='[1]'))),(simple_note_algorithm,TYPE(NAME=SIMPLE_NOTE,PROPERTIES('shadow'='true',foo='bar')))))"
/>
<distsql-case id="create-sharding-key-generator" value="CREATE SHARDING
KEY GENERATOR uuid_key_generator(TYPE(NAME=uuid,PROPERTIES('worker-id'=123)))"
/>
- <distsql-case id="create-sharding-scaling-without-configuration"
value="CREATE SHARDING SCALING default_scaling" />
- <distsql-case id="create-sharding-scaling-with-minimal-auto-configuration"
value="CREATE SHARDING SCALING default_scaling (COMPLETION_DETECTOR
(TYPE(NAME=IDLE,PROPERTIES('incremental-task-idle-minute-threshold'=30))),DATA_CONSISTENCY_CHECKER
(TYPE(NAME=DATA_MATCH,PROPERTIES ('chunk-size'=1000))))" />
- <distsql-case
id="create-sharding-scaling-with-complete-auto-configuration" value="CREATE
SHARDING SCALING default_scaling (INPUT
(WORKER_THREAD=40,BATCH_SIZE=1000,RATE_LIMITER (TYPE(NAME=QPS,PROPERTIES
('qps'=50)))),OUTPUT (WORKER_THREAD=40,BATCH_SIZE=1000,RATE_LIMITER
(TYPE(NAME=TPS,PROPERTIES ('tps'=2000)))),STREAM_CHANNEL (TYPE
(NAME=MEMORY,PROPERTIES ('block-queue-size'=10000))),COMPLETION_DETECTOR (TYPE
(NAME=IDLE,PROPERTIES ('incremental-task-idle-minute-threshold'=30))),DATA_
[...]
- <distsql-case id="create-sharding-scaling-with-manual-configuration"
value="CREATE SHARDING SCALING default_scaling (INPUT
(WORKER_THREAD=40,BATCH_SIZE=1000,RATE_LIMITER (TYPE(NAME=QPS,PROPERTIES
('qps'=50)))),OUTPUT (WORKER_THREAD=40,BATCH_SIZE=1000,RATE_LIMITER (TYPE
(NAME=TPS,PROPERTIES ('tps'=2000)))),STREAM_CHANNEL (TYPE
(NAME=MEMORY,PROPERTIES ('block-queue-size'=10000))))" />
+ <distsql-case id="create-sharding-scaling-rule-without-configuration"
value="CREATE SHARDING SCALING RULE default_scaling" />
+ <distsql-case
id="create-sharding-scaling-rule-with-minimal-auto-configuration" value="CREATE
SHARDING SCALING RULE default_scaling (COMPLETION_DETECTOR
(TYPE(NAME=IDLE,PROPERTIES('incremental-task-idle-minute-threshold'=30))),DATA_CONSISTENCY_CHECKER
(TYPE(NAME=DATA_MATCH,PROPERTIES ('chunk-size'=1000))))" />
+ <distsql-case
id="create-sharding-scaling-rule-with-complete-auto-configuration"
value="CREATE SHARDING SCALING RULE default_scaling (INPUT
(WORKER_THREAD=40,BATCH_SIZE=1000,RATE_LIMITER (TYPE(NAME=QPS,PROPERTIES
('qps'=50)))),OUTPUT (WORKER_THREAD=40,BATCH_SIZE=1000,RATE_LIMITER
(TYPE(NAME=TPS,PROPERTIES ('tps'=2000)))),STREAM_CHANNEL (TYPE
(NAME=MEMORY,PROPERTIES ('block-queue-size'=10000))),COMPLETION_DETECTOR (TYPE
(NAME=IDLE,PROPERTIES ('incremental-task-idle-minute-threshold'=3 [...]
+ <distsql-case id="create-sharding-scaling-rule-with-manual-configuration"
value="CREATE SHARDING SCALING RULE default_scaling (INPUT
(WORKER_THREAD=40,BATCH_SIZE=1000,RATE_LIMITER (TYPE(NAME=QPS,PROPERTIES
('qps'=50)))),OUTPUT (WORKER_THREAD=40,BATCH_SIZE=1000,RATE_LIMITER (TYPE
(NAME=TPS,PROPERTIES ('tps'=2000)))),STREAM_CHANNEL (TYPE
(NAME=MEMORY,PROPERTIES ('block-queue-size'=10000))))" />
</sql-cases>
diff --git
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/rdl/drop.xml
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/rdl/drop.xml
index d8f8e12..cd55eb7 100644
---
a/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/rdl/drop.xml
+++
b/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported/rdl/drop.xml
@@ -34,5 +34,5 @@
<distsql-case id="drop-default-single-table" value="DROP DEFAULT SINGLE
TABLE RULE" />
<distsql-case id="drop-sharding-key-generator" value="DROP SHARDING KEY
GENERATOR uuid_key_generator" />
<distsql-case id="drop-default-sharding-strategy" value="DROP DEFAULT
SHARDING TABLE STRATEGY" />
- <distsql-case id="drop-sharding-scaling" value="DROP SHARDING SCALING
default_scaling" />
+ <distsql-case id="drop-sharding-scaling-rule" value="DROP SHARDING SCALING
RULE default_scaling" />
</sql-cases>