You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by me...@apache.org on 2021/02/28 13:00:46 UTC
[shardingsphere] branch master updated: Support sharding join SQLs
using calcite executor (#9518)
This is an automated email from the ASF dual-hosted git repository.
menghaoran 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 dde3bb9 Support sharding join SQLs using calcite executor (#9518)
dde3bb9 is described below
commit dde3bb99e090f32338fc81d09bb6a427efd2aba9
Author: Juan Pan(Trista) <pa...@apache.org>
AuthorDate: Sun Feb 28 21:00:16 2021 +0800
Support sharding join SQLs using calcite executor (#9518)
* Support sharding join SQLs using calcite executor
* fix test
* check style
* Refactor YamlDataSourceConfigurationSwapper (#9519)
* Add issue NO for test cases
* Refactor YamlDataSourceConfigurationSwapper
* add dql cases of encrypt (#9503)
* add dql cases of encrypt
* rename pwd
* add scenarioTypes feature (#9516)
* add scenarioTypes
* ci fixed
* Refactor YamlDataSourceConfigurationSwapper (#9522)
* Optimize reset scaling job (#9523)
* rename ScalingOperateExecuteException to ScalingJobOperateException
* Optimize ScalingJobNotFoundException
* rename function
* Optimize reset scaling job
Co-authored-by: qiulu3 <Lucas209910>
* fix put()
* reverse
* Revert "reverse"
This reverts commit dc64b913
* reverse
* reverse
* reverse
Co-authored-by: Liang Zhang <te...@163.com>
Co-authored-by: Jieker <ji...@163.com>
Co-authored-by: 邱鹿 Lucas <lu...@163.com>
---
.../db/protocol/error/CommonErrorCode.java | 4 +--
.../engine/type/ShardingRouteEngineFactory.java | 26 ++++++++++++-----
.../ShardingFederatedRoutingEngine.java} | 27 ++++++++----------
.../metadata/DataSourceChangedListener.java | 2 +-
.../yaml/config/YamlConfigurationConverter.java | 2 +-
.../statement/dml/SelectStatementContext.java | 2 +-
.../YamlDataSourceConfigurationSwapper.java | 33 +++++++++++++---------
.../YamlDataSourceConfigurationSwapperTest.java | 28 +++++++++---------
.../infra/route/context/RouteContext.java | 17 +++++++++++
...on.java => ScalingOperateExecuteException.java} | 4 +--
.../ral/impl/ResetScalingJobBackendHandler.java | 8 +++---
.../frontend/mysql/MySQLErrPacketFactory.java | 6 ++--
.../scaling/web/HttpServerHandler.java | 4 +--
.../scaling/core/api/RegistryRepositoryAPI.java | 7 -----
.../scaling/core/api/ScalingAPI.java | 14 ++++-----
.../core/api/impl/RegistryRepositoryAPIImpl.java | 13 ++++-----
.../scaling/core/api/impl/ScalingAPIImpl.java | 5 ++--
.../exception/ScalingJobNotFoundException.java | 8 +-----
.../scaling/core/api/impl/ScalingAPIImplTest.java | 2 +-
.../cases/assertion/IntegrationTestCase.java | 3 --
.../engine/param/ParameterizedArrayFactory.java | 7 ++---
.../cases/dql/dataset/db/select_by_encrypt.xml | 24 ----------------
.../cases/dql/dataset/db/select_in_encrypt.xml | 24 ----------------
.../dataset/db/select_in_encrypt_without_pwd.xml | 23 ---------------
.../cases/dql/dataset/db/select_in_or_encrypt.xml | 25 ----------------
.../dbtbl_with_replica_query/select_by_encrypt.xml | 24 ----------------
.../dbtbl_with_replica_query/select_in_encrypt.xml | 24 ----------------
.../select_in_encrypt_without_pwd.xml | 23 ---------------
.../select_in_or_encrypt.xml | 25 ----------------
.../dql/dataset/encrypt/select_by_encrypt.xml | 24 ----------------
.../dql/dataset/encrypt/select_in_encrypt.xml | 24 ----------------
.../encrypt/select_in_encrypt_without_pwd.xml | 23 ---------------
.../dql/dataset/encrypt/select_in_or_encrypt.xml | 25 ----------------
.../dataset/replica_query/select_by_encrypt.xml | 24 ----------------
.../dataset/replica_query/select_in_encrypt.xml | 24 ----------------
.../select_in_encrypt_without_pwd.xml | 23 ---------------
.../dataset/replica_query/select_in_or_encrypt.xml | 25 ----------------
.../cases/dql/dataset/tbl/select_by_encrypt.xml | 24 ----------------
.../cases/dql/dataset/tbl/select_in_encrypt.xml | 24 ----------------
.../dataset/tbl/select_in_encrypt_without_pwd.xml | 23 ---------------
.../cases/dql/dataset/tbl/select_in_or_encrypt.xml | 25 ----------------
.../cases/dql/dql-integration-test-cases.xml | 16 -----------
42 files changed, 115 insertions(+), 603 deletions(-)
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-core/src/main/java/org/apache/shardingsphere/db/protocol/error/CommonErrorCode.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-core/src/main/java/org/apache/shardingsphere/db/protocol/error/CommonErrorCode.java
index a0c5aa2..0d4fffb 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-core/src/main/java/org/apache/shardingsphere/db/protocol/error/CommonErrorCode.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-core/src/main/java/org/apache/shardingsphere/db/protocol/error/CommonErrorCode.java
@@ -49,9 +49,7 @@ public enum CommonErrorCode implements SQLErrorCode {
SHARDING_TABLE_RULE_EXIST(11010, "C11010", "Sharding table rules: [%s] already exists."),
- SCALING_JOB_NOT_EXIST(12001, "C12001", "Scaling job %s does not exist."),
-
- SCALING_OPERATE_FAILED(12009, "C12009", "Scaling Operate Failed: [%s]"),
+ SCALING_OPERATE_FAILED(12001, "C12001", "Scaling Operate Failed: [%s]"),
UNSUPPORTED_COMMAND(19998, "C19998", "Unsupported command: [%s]"),
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-route/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/ShardingRouteEngineFactory.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-route/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/ShardingRouteEngineFactory.java
index a7b1137..5ea55b8 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-route/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/ShardingRouteEngineFactory.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-route/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/ShardingRouteEngineFactory.java
@@ -20,6 +20,7 @@ package org.apache.shardingsphere.sharding.route.engine.type;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
+import org.apache.shardingsphere.infra.binder.statement.dml.SelectStatementContext;
import org.apache.shardingsphere.infra.binder.type.TableAvailable;
import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
@@ -30,7 +31,7 @@ import org.apache.shardingsphere.sharding.route.engine.type.broadcast.ShardingIn
import org.apache.shardingsphere.sharding.route.engine.type.broadcast.ShardingTableBroadcastRoutingEngine;
import org.apache.shardingsphere.sharding.route.engine.type.complex.ShardingComplexRoutingEngine;
import org.apache.shardingsphere.sharding.route.engine.type.ignore.ShardingIgnoreRoutingEngine;
-import org.apache.shardingsphere.sharding.route.engine.type.single.ShardingSingleRoutingEngine;
+import org.apache.shardingsphere.sharding.route.engine.type.federated.ShardingFederatedRoutingEngine;
import org.apache.shardingsphere.sharding.route.engine.type.single.SingleTableRoutingEngine;
import org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine;
import org.apache.shardingsphere.sharding.route.engine.type.unicast.ShardingUnicastRoutingEngine;
@@ -82,7 +83,7 @@ public final class ShardingRouteEngineFactory {
return getDDLRoutingEngine(shardingRule, metaData, sqlStatementContext);
}
if (sqlStatement instanceof DALStatement) {
- return getDALRoutingEngine(shardingRule, metaData, sqlStatement, tableNames);
+ return getDALRoutingEngine(shardingRule, sqlStatement, tableNames);
}
if (sqlStatement instanceof DCLStatement) {
return getDCLRoutingEngine(shardingRule, metaData, sqlStatementContext);
@@ -104,8 +105,7 @@ public final class ShardingRouteEngineFactory {
return new ShardingTableBroadcastRoutingEngine(metaData.getSchema(), sqlStatementContext);
}
- private static ShardingRouteEngine getDALRoutingEngine(final ShardingRule shardingRule, final ShardingSphereMetaData metaData,
- final SQLStatement sqlStatement, final Collection<String> tableNames) {
+ private static ShardingRouteEngine getDALRoutingEngine(final ShardingRule shardingRule, final SQLStatement sqlStatement, final Collection<String> tableNames) {
if (sqlStatement instanceof MySQLUseStatement) {
return new ShardingIgnoreRoutingEngine();
}
@@ -153,18 +153,30 @@ public final class ShardingRouteEngineFactory {
return new SingleTableRoutingEngine(tableNames, sqlStatement);
}
if (shardingRule.tableRuleExists(tableNames) && shardingRule.singleTableRuleExists(tableNames)) {
- return new ShardingSingleRoutingEngine(tableNames);
+ return new ShardingFederatedRoutingEngine(tableNames);
}
- return getShardingRoutingEngine(shardingRule, shardingConditions, tableNames, props);
+ return getShardingRoutingEngine(shardingRule, shardingConditions, sqlStatementContext, tableNames, props);
}
- private static ShardingRouteEngine getShardingRoutingEngine(final ShardingRule shardingRule, final ShardingConditions shardingConditions,
+ private static ShardingRouteEngine getShardingRoutingEngine(final ShardingRule shardingRule, final ShardingConditions shardingConditions,
+ final SQLStatementContext<?> sqlStatementContext,
final Collection<String> tableNames, final ConfigurationProperties props) {
Collection<String> shardingTableNames = shardingRule.getShardingLogicTableNames(tableNames);
if (1 == shardingTableNames.size() || shardingRule.isAllBindingTables(shardingTableNames)) {
return new ShardingStandardRoutingEngine(shardingTableNames.iterator().next(), shardingConditions, props);
}
+ if (isFederatedQuery(sqlStatementContext, tableNames, shardingTableNames)) {
+ return new ShardingFederatedRoutingEngine(tableNames);
+ }
// TODO config for cartesian set
return new ShardingComplexRoutingEngine(tableNames, shardingConditions, props);
}
+
+ private static boolean isFederatedQuery(final SQLStatementContext<?> sqlStatementContext, final Collection<String> tableNames, final Collection<String> shardingTableNames) {
+ if (!(sqlStatementContext instanceof SelectStatementContext)) {
+ return false;
+ }
+ SelectStatementContext select = (SelectStatementContext) sqlStatementContext;
+ return tableNames.size() == shardingTableNames.size() && (select.containsJoinQuery() || select.isContainsSubquery());
+ }
}
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-route/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/single/ShardingSingleRoutingEngine.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-route/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/federated/ShardingFederatedRoutingEngine.java
similarity index 61%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-route/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/single/ShardingSingleRoutingEngine.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-route/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/federated/ShardingFederatedRoutingEngine.java
index 7ec9aee..47da4e5 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-route/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/single/ShardingSingleRoutingEngine.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-route/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/federated/ShardingFederatedRoutingEngine.java
@@ -15,26 +15,23 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.sharding.route.engine.type.single;
+package org.apache.shardingsphere.sharding.route.engine.type.federated;
import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.infra.datanode.DataNode;
import org.apache.shardingsphere.infra.route.context.RouteContext;
import org.apache.shardingsphere.infra.route.context.RouteMapper;
-import org.apache.shardingsphere.infra.route.context.RouteUnit;
import org.apache.shardingsphere.sharding.route.engine.type.ShardingRouteEngine;
import org.apache.shardingsphere.sharding.rule.ShardingRule;
import org.apache.shardingsphere.sharding.rule.TableRule;
import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedList;
/**
- * Sharding single routing engine.
+ * Sharding federated routing engine.
*/
@RequiredArgsConstructor
-public final class ShardingSingleRoutingEngine implements ShardingRouteEngine {
+public final class ShardingFederatedRoutingEngine implements ShardingRouteEngine {
private final Collection<String> logicTables;
@@ -42,23 +39,23 @@ public final class ShardingSingleRoutingEngine implements ShardingRouteEngine {
public void route(final RouteContext routeContext, final ShardingRule shardingRule) {
for (String each : logicTables) {
if (shardingRule.getSingleTableRules().containsKey(each)) {
- String datasource = shardingRule.getSingleTableRules().get(each).getDataSourceName();
- RouteUnit unit = new RouteUnit(new RouteMapper(datasource, datasource), Collections.singletonList(new RouteMapper(each, each)));
- routeContext.getRouteUnits().add(unit);
+ String dataSourceName = shardingRule.getSingleTableRules().get(each).getDataSourceName();
+ RouteMapper dataSource = new RouteMapper(dataSourceName, dataSourceName);
+ RouteMapper table = new RouteMapper(each, each);
+ routeContext.putRouteUnit(dataSource, table);
} else {
- routeContext.getRouteUnits().addAll(getAllRouteUnits(shardingRule, each));
+ fillRouteContext(routeContext, shardingRule, each);
}
}
routeContext.setToCalcite(true);
}
- private Collection<RouteUnit> getAllRouteUnits(final ShardingRule shardingRule, final String logicTableName) {
- Collection<RouteUnit> result = new LinkedList<>();
+ private void fillRouteContext(final RouteContext routeContext, final ShardingRule shardingRule, final String logicTableName) {
TableRule tableRule = shardingRule.getTableRule(logicTableName);
for (DataNode each : tableRule.getActualDataNodes()) {
- RouteUnit routeUnit = new RouteUnit(new RouteMapper(each.getDataSourceName(), each.getDataSourceName()), Collections.singletonList(new RouteMapper(logicTableName, each.getTableName())));
- result.add(routeUnit);
+ RouteMapper dataSource = new RouteMapper(each.getDataSourceName(), each.getDataSourceName());
+ RouteMapper table = new RouteMapper(logicTableName, each.getTableName());
+ routeContext.putRouteUnit(dataSource, table);
}
- return result;
}
}
diff --git a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/config/listener/metadata/DataSourceChangedListener.java b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/config/listener/metadata/DataSourceChangedListener.java
index 304351f..f126421 100644
--- a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/config/listener/metadata/DataSourceChangedListener.java
+++ b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/config/listener/metadata/DataSourceChangedListener.java
@@ -66,6 +66,6 @@ public final class DataSourceChangedListener extends PostGovernanceRepositoryEve
Preconditions.checkState(null != result && !result.getDataSources().isEmpty(), "No available data sources to load for governance.");
return new DataSourceChangedEvent(schemaName, result.getDataSources().entrySet().stream()
.collect(Collectors.toMap(Entry::getKey, entry -> new YamlDataSourceConfigurationSwapper()
- .swapToDataSourceConfiguration(entry.getValue()), (oldValue, currentValue) -> oldValue, LinkedHashMap::new)));
+ .swapToObjectFromMap(entry.getValue()), (oldValue, currentValue) -> oldValue, LinkedHashMap::new)));
}
}
diff --git a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/yaml/config/YamlConfigurationConverter.java b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/yaml/config/YamlConfigurationConverter.java
index fb5bb30..14e9e8a 100644
--- a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/yaml/config/YamlConfigurationConverter.java
+++ b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/yaml/config/YamlConfigurationConverter.java
@@ -68,7 +68,7 @@ public final class YamlConfigurationConverter {
* @return data source configurations
*/
public static Map<String, DataSourceConfiguration> convertDataSourceConfigurations(final Map<String, Map<String, Object>> yamlDataSourceConfigs) {
- return Maps.transformValues(yamlDataSourceConfigs, new YamlDataSourceConfigurationSwapper()::swapToDataSourceConfiguration);
+ return Maps.transformValues(yamlDataSourceConfigs, new YamlDataSourceConfigurationSwapper()::swapToObjectFromMap);
}
/**
diff --git a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dml/SelectStatementContext.java b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dml/SelectStatementContext.java
index 2b8ea7d..5989067 100644
--- a/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dml/SelectStatementContext.java
+++ b/shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/statement/dml/SelectStatementContext.java
@@ -19,7 +19,6 @@ package org.apache.shardingsphere.infra.binder.statement.dml;
import com.google.common.base.Preconditions;
import lombok.Getter;
-import org.apache.shardingsphere.infra.metadata.schema.ShardingSphereSchema;
import org.apache.shardingsphere.infra.binder.segment.select.groupby.GroupByContext;
import org.apache.shardingsphere.infra.binder.segment.select.groupby.engine.GroupByContextEngine;
import org.apache.shardingsphere.infra.binder.segment.select.orderby.OrderByContext;
@@ -35,6 +34,7 @@ import org.apache.shardingsphere.infra.binder.segment.table.TablesContext;
import org.apache.shardingsphere.infra.binder.statement.CommonSQLStatementContext;
import org.apache.shardingsphere.infra.binder.type.TableAvailable;
import org.apache.shardingsphere.infra.binder.type.WhereAvailable;
+import org.apache.shardingsphere.infra.metadata.schema.ShardingSphereSchema;
import org.apache.shardingsphere.sql.parser.sql.common.extractor.TableExtractor;
import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.order.item.ColumnOrderByItemSegment;
import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.order.item.ExpressionOrderByItemSegment;
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/yaml/swapper/YamlDataSourceConfigurationSwapper.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/yaml/swapper/YamlDataSourceConfigurationSwapper.java
index 53fbd99..20269f3 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/yaml/swapper/YamlDataSourceConfigurationSwapper.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/yaml/swapper/YamlDataSourceConfigurationSwapper.java
@@ -18,21 +18,22 @@
package org.apache.shardingsphere.infra.yaml.swapper;
import com.google.common.base.Preconditions;
+import com.google.common.base.Strings;
import org.apache.shardingsphere.infra.config.datasource.DataSourceConfiguration;
import org.apache.shardingsphere.infra.config.datasource.DataSourceConverter;
import javax.sql.DataSource;
import java.util.HashMap;
import java.util.Map;
-import java.util.Map.Entry;
+import java.util.Objects;
import java.util.stream.Collectors;
/**
- * YAML data source configuration swapper.
+ * Yaml data source configuration swapper.
*/
public final class YamlDataSourceConfigurationSwapper {
- private static final String DATA_SOURCE_CLASS_NAME_KEY = "dataSourceClassName";
+ private static final String YAML_DATA_SOURCE_CLASS_NAME = "dataSourceClassName";
/**
* Swap to data sources from YAML data sources.
@@ -41,20 +42,23 @@ public final class YamlDataSourceConfigurationSwapper {
* @return data sources
*/
public Map<String, DataSource> swapToDataSources(final Map<String, Map<String, Object>> yamlDataSources) {
- return DataSourceConverter.getDataSourceMap(yamlDataSources.entrySet().stream().collect(Collectors.toMap(Entry::getKey, entry -> swapToDataSourceConfiguration(entry.getValue()))));
+ Map<String, DataSourceConfiguration> dataSourceConfigMap = yamlDataSources.entrySet().stream()
+ .collect(Collectors.toMap(Map.Entry::getKey, entry -> swapToObjectFromMap(entry.getValue())));
+ return DataSourceConverter.getDataSourceMap(dataSourceConfigMap);
}
/**
- * Swap to data source configuration.
+ * Swap to data source configuration from map.
*
- * @param yamlConfig YAML configurations
+ * @param yamlConfig yaml config map
* @return data source configuration
*/
- public DataSourceConfiguration swapToDataSourceConfiguration(final Map<String, Object> yamlConfig) {
- Preconditions.checkState(yamlConfig.containsKey(DATA_SOURCE_CLASS_NAME_KEY), "%s can not be null.", DATA_SOURCE_CLASS_NAME_KEY);
+ public DataSourceConfiguration swapToObjectFromMap(final Map<String, Object> yamlConfig) {
+ String dataSourceClassName = Objects.isNull(yamlConfig.get(YAML_DATA_SOURCE_CLASS_NAME)) ? "" : yamlConfig.get(YAML_DATA_SOURCE_CLASS_NAME).toString();
+ Preconditions.checkState(!Strings.isNullOrEmpty(dataSourceClassName), String.format("%s can not be null", YAML_DATA_SOURCE_CLASS_NAME));
Map<String, Object> newDataSourceMap = new HashMap<>(yamlConfig);
- newDataSourceMap.remove(DATA_SOURCE_CLASS_NAME_KEY);
- DataSourceConfiguration result = new DataSourceConfiguration(yamlConfig.get(DATA_SOURCE_CLASS_NAME_KEY).toString());
+ newDataSourceMap.remove(YAML_DATA_SOURCE_CLASS_NAME);
+ DataSourceConfiguration result = new DataSourceConfiguration(dataSourceClassName);
result.getProps().putAll(newDataSourceMap);
return result;
}
@@ -62,12 +66,13 @@ public final class YamlDataSourceConfigurationSwapper {
/**
* Swap to map from data source configuration.
*
- * @param dataSourceConfig data source configuration
+ * @param config data source configuration
* @return data source map
*/
- public Map<String, Object> swapToMap(final DataSourceConfiguration dataSourceConfig) {
- Map<String, Object> result = new HashMap<>(dataSourceConfig.getProps());
- result.put(DATA_SOURCE_CLASS_NAME_KEY, dataSourceConfig.getDataSourceClassName());
+ public Map<String, Object> swapToMap(final DataSourceConfiguration config) {
+ Map<String, Object> result = new HashMap<>();
+ result.putAll(config.getProps());
+ result.put(YAML_DATA_SOURCE_CLASS_NAME, config.getDataSourceClassName());
return result;
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/yaml/swapper/YamlDataSourceConfigurationSwapperTest.java b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/yaml/swapper/YamlDataSourceConfigurationSwapperTest.java
index bb38db5..cd93700 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/yaml/swapper/YamlDataSourceConfigurationSwapperTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/yaml/swapper/YamlDataSourceConfigurationSwapperTest.java
@@ -28,29 +28,29 @@ import static org.junit.Assert.assertThat;
public final class YamlDataSourceConfigurationSwapperTest {
- private final YamlDataSourceConfigurationSwapper swapper = new YamlDataSourceConfigurationSwapper();
+ private final YamlDataSourceConfigurationSwapper yamlDataSourceConfigurationSwapper = new YamlDataSourceConfigurationSwapper();
@Test
- public void assertSwapToDataSourceConfiguration() {
+ public void assertSwapToMap() {
+ DataSourceConfiguration dataSourceConfig = new DataSourceConfiguration("xxx.jdbc.driver");
+ dataSourceConfig.getProps().put("url", "xx:xxx");
+ dataSourceConfig.getProps().put("username", "root");
+ Map<String, Object> actual = yamlDataSourceConfigurationSwapper.swapToMap(dataSourceConfig);
+ assertThat(actual.get("dataSourceClassName"), is("xxx.jdbc.driver"));
+ assertThat(actual.get("url").toString(), is("xx:xxx"));
+ assertThat(actual.get("username").toString(), is("root"));
+ }
+
+ @Test
+ public void assertSwapToConfiguration() {
Map<String, Object> yamlConfig = new HashMap<>(3, 1);
yamlConfig.put("dataSourceClassName", "xxx.jdbc.driver");
yamlConfig.put("url", "xx:xxx");
yamlConfig.put("username", "root");
- DataSourceConfiguration actual = swapper.swapToDataSourceConfiguration(yamlConfig);
+ DataSourceConfiguration actual = yamlDataSourceConfigurationSwapper.swapToObjectFromMap(yamlConfig);
assertThat(actual.getDataSourceClassName(), is("xxx.jdbc.driver"));
assertThat(actual.getProps().size(), is(2));
assertThat(actual.getProps().get("url").toString(), is("xx:xxx"));
assertThat(actual.getProps().get("username").toString(), is("root"));
}
-
- @Test
- public void assertSwapToMap() {
- DataSourceConfiguration dataSourceConfig = new DataSourceConfiguration("xxx.jdbc.driver");
- dataSourceConfig.getProps().put("url", "xx:xxx");
- dataSourceConfig.getProps().put("username", "root");
- Map<String, Object> actual = swapper.swapToMap(dataSourceConfig);
- assertThat(actual.get("dataSourceClassName"), is("xxx.jdbc.driver"));
- assertThat(actual.get("url").toString(), is("xx:xxx"));
- assertThat(actual.get("username").toString(), is("root"));
- }
}
diff --git a/shardingsphere-infra/shardingsphere-infra-route/src/main/java/org/apache/shardingsphere/infra/route/context/RouteContext.java b/shardingsphere-infra/shardingsphere-infra-route/src/main/java/org/apache/shardingsphere/infra/route/context/RouteContext.java
index 7b05ad7..dabb9b0 100644
--- a/shardingsphere-infra/shardingsphere-infra-route/src/main/java/org/apache/shardingsphere/infra/route/context/RouteContext.java
+++ b/shardingsphere-infra/shardingsphere-infra-route/src/main/java/org/apache/shardingsphere/infra/route/context/RouteContext.java
@@ -50,6 +50,23 @@ public final class RouteContext {
private boolean toCalcite;
/**
+ * Put route unit.
+ *
+ * @param dataSourceMapper database mapper
+ * @param tableMapper table mapper
+ */
+ public void putRouteUnit(final RouteMapper dataSourceMapper, final RouteMapper tableMapper) {
+ Optional<RouteUnit> target = routeUnits.stream().filter(unit -> unit.getDataSourceMapper().equals(dataSourceMapper)).findFirst();
+ RouteUnit unit = new RouteUnit(dataSourceMapper, new LinkedHashSet<>());
+ if (target.isPresent()) {
+ unit.getTableMappers().addAll(target.get().getTableMappers());
+ routeUnits.remove(target.get());
+ }
+ unit.getTableMappers().add(tableMapper);
+ routeUnits.add(unit);
+ }
+
+ /**
* Judge is route for single database and table only or not.
*
* @return is route for single database and table only or not
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/ScalingJobOperateException.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/ScalingOperateExecuteException.java
similarity index 90%
rename from shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/ScalingJobOperateException.java
rename to shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/ScalingOperateExecuteException.java
index d196efe..b961024 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/ScalingJobOperateException.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/ScalingOperateExecuteException.java
@@ -21,11 +21,11 @@ import lombok.Getter;
import lombok.RequiredArgsConstructor;
/**
- * Scaling job operate exception.
+ * Scaling operate execute exception.
*/
@RequiredArgsConstructor
@Getter
-public final class ScalingJobOperateException extends BackendException {
+public final class ScalingOperateExecuteException extends BackendException {
private static final long serialVersionUID = 7598088400647370901L;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/impl/ResetScalingJobBackendHandler.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/impl/ResetScalingJobBackendHandler.java
index 0cb1f12..687b4d8 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/impl/ResetScalingJobBackendHandler.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/impl/ResetScalingJobBackendHandler.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.proxy.backend.text.distsql.ral.impl;
import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.distsql.parser.statement.ral.impl.ResetScalingJobStatement;
-import org.apache.shardingsphere.proxy.backend.exception.ScalingJobOperateException;
+import org.apache.shardingsphere.proxy.backend.exception.ScalingOperateExecuteException;
import org.apache.shardingsphere.proxy.backend.response.header.ResponseHeader;
import org.apache.shardingsphere.proxy.backend.response.header.update.UpdateResponseHeader;
import org.apache.shardingsphere.proxy.backend.text.TextProtocolBackendHandler;
@@ -41,9 +41,9 @@ public final class ResetScalingJobBackendHandler implements TextProtocolBackendH
@Override
public ResponseHeader execute() {
try {
- scalingAPI.reset(sqlStatement.getJobId());
- } catch (final SQLException ex) {
- throw new ScalingJobOperateException(ex.getMessage());
+ scalingAPI.resetTargetTable(sqlStatement.getJobId());
+ } catch (SQLException ex) {
+ throw new ScalingOperateExecuteException(ex.getMessage());
}
return new UpdateResponseHeader(sqlStatement);
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLErrPacketFactory.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLErrPacketFactory.java
index 9d9aded..13b5fe2 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLErrPacketFactory.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLErrPacketFactory.java
@@ -35,6 +35,7 @@ import org.apache.shardingsphere.proxy.backend.exception.ReplicaQueryRuleNotExis
import org.apache.shardingsphere.proxy.backend.exception.ResourceInUsedException;
import org.apache.shardingsphere.proxy.backend.exception.ResourceNotExistedException;
import org.apache.shardingsphere.proxy.backend.exception.RuleNotExistsException;
+import org.apache.shardingsphere.proxy.backend.exception.ScalingOperateExecuteException;
import org.apache.shardingsphere.proxy.backend.exception.ShardingRuleNotExistedException;
import org.apache.shardingsphere.proxy.backend.exception.ShardingTableRuleExistedException;
import org.apache.shardingsphere.proxy.backend.exception.ShardingTableRuleNotExistedException;
@@ -45,7 +46,6 @@ import org.apache.shardingsphere.proxy.backend.text.sctl.ShardingCTLErrorCode;
import org.apache.shardingsphere.proxy.backend.text.sctl.exception.ShardingCTLException;
import org.apache.shardingsphere.proxy.frontend.exception.UnsupportedCommandException;
import org.apache.shardingsphere.proxy.frontend.exception.UnsupportedPreparedStatementException;
-import org.apache.shardingsphere.scaling.core.common.exception.ScalingJobNotFoundException;
import org.apache.shardingsphere.sharding.route.engine.exception.NoSuchTableException;
import org.apache.shardingsphere.sharding.route.engine.exception.TableExistsException;
import org.apache.shardingsphere.sql.parser.exception.SQLParsingException;
@@ -143,8 +143,8 @@ public final class MySQLErrPacketFactory {
if (cause instanceof ReplicaQueryRuleCreateExistsException) {
return new MySQLErrPacket(1, CommonErrorCode.REPLICA_QUERY_RULE_EXIST);
}
- if (cause instanceof ScalingJobNotFoundException) {
- return new MySQLErrPacket(1, CommonErrorCode.SCALING_JOB_NOT_EXIST, ((ScalingJobNotFoundException) cause).getJobId());
+ if (cause instanceof ScalingOperateExecuteException) {
+ return new MySQLErrPacket(1, CommonErrorCode.SCALING_OPERATE_FAILED, cause.getMessage());
}
return new MySQLErrPacket(1, CommonErrorCode.UNKNOWN_EXCEPTION, cause.getMessage());
}
diff --git a/shardingsphere-scaling/shardingsphere-scaling-bootstrap/src/main/java/org/apache/shardingsphere/scaling/web/HttpServerHandler.java b/shardingsphere-scaling/shardingsphere-scaling-bootstrap/src/main/java/org/apache/shardingsphere/scaling/web/HttpServerHandler.java
index ac0aad9..75904f3 100644
--- a/shardingsphere-scaling/shardingsphere-scaling-bootstrap/src/main/java/org/apache/shardingsphere/scaling/web/HttpServerHandler.java
+++ b/shardingsphere-scaling/shardingsphere-scaling-bootstrap/src/main/java/org/apache/shardingsphere/scaling/web/HttpServerHandler.java
@@ -37,8 +37,8 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.shardingsphere.scaling.core.api.JobInfo;
import org.apache.shardingsphere.scaling.core.api.ScalingAPI;
import org.apache.shardingsphere.scaling.core.api.ScalingAPIFactory;
-import org.apache.shardingsphere.scaling.core.common.exception.ScalingJobNotFoundException;
import org.apache.shardingsphere.scaling.core.config.JobConfiguration;
+import org.apache.shardingsphere.scaling.core.common.exception.ScalingJobNotFoundException;
import org.apache.shardingsphere.scaling.util.ResponseContentUtil;
import java.sql.SQLException;
@@ -125,7 +125,7 @@ public final class HttpServerHandler extends SimpleChannelInboundHandler<FullHtt
private void resetJob(final ChannelHandlerContext context, final String requestPath) {
try {
- scalingAPI.reset(getJobId(requestPath));
+ scalingAPI.resetTargetTable(getJobId(requestPath));
response(ResponseContentUtil.success(), context, HttpResponseStatus.OK);
} catch (final ScalingJobNotFoundException | SQLException ex) {
response(ResponseContentUtil.handleBadRequest(ex.getMessage()), context, HttpResponseStatus.BAD_REQUEST);
diff --git a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/api/RegistryRepositoryAPI.java b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/api/RegistryRepositoryAPI.java
index fba1e01..8d6344d 100644
--- a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/api/RegistryRepositoryAPI.java
+++ b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/api/RegistryRepositoryAPI.java
@@ -45,13 +45,6 @@ public interface RegistryRepositoryAPI {
JobProgress getJobProgress(long jobId, int shardingItem);
/**
- * Delete job progress.
- *
- * @param jobId job id
- */
- void deleteJobProgress(long jobId);
-
- /**
* Delete job.
*
* @param jobId job id
diff --git a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/api/ScalingAPI.java b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/api/ScalingAPI.java
index de78cf0..5507432 100644
--- a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/api/ScalingAPI.java
+++ b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/api/ScalingAPI.java
@@ -39,14 +39,14 @@ public interface ScalingAPI {
List<JobInfo> list();
/**
- * Start scaling job by id.
+ * Start a scaling job by id.
*
* @param jobId job id
*/
void start(long jobId);
/**
- * Start scaling job by config.
+ * Start a scaling job by config.
*
* @param jobConfig job config
* @return job id
@@ -54,21 +54,21 @@ public interface ScalingAPI {
Optional<Long> start(JobConfiguration jobConfig);
/**
- * Stop scaling job.
+ * Stop a job.
*
* @param jobId job id
*/
void stop(long jobId);
/**
- * Remove scaling job.
+ * Remove a job.
*
* @param jobId job id
*/
void remove(long jobId);
/**
- * Get job progress.
+ * Get progress.
*
* @param jobId job id
* @return each sharding item progress
@@ -84,12 +84,12 @@ public interface ScalingAPI {
Map<String, DataConsistencyCheckResult> dataConsistencyCheck(long jobId);
/**
- * Reset scaling job.
+ * Reset target table.
*
* @param jobId job id
* @throws SQLException SQL exception
*/
- void reset(long jobId) throws SQLException;
+ void resetTargetTable(long jobId) throws SQLException;
/**
* Get job configuration.
diff --git a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/api/impl/RegistryRepositoryAPIImpl.java b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/api/impl/RegistryRepositoryAPIImpl.java
index ec86a13..4852f33 100644
--- a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/api/impl/RegistryRepositoryAPIImpl.java
+++ b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/api/impl/RegistryRepositoryAPIImpl.java
@@ -72,17 +72,16 @@ public final class RegistryRepositoryAPIImpl implements RegistryRepositoryAPI {
@Override
public JobProgress getJobProgress(final long jobId, final int shardingItem) {
- String data = registryRepository.get(getOffsetPath(jobId, shardingItem));
+ String data = null;
+ try {
+ data = registryRepository.get(getOffsetPath(jobId, shardingItem));
+ } catch (final NullPointerException ex) {
+ log.info("job {}-{} without break point.", jobId, shardingItem);
+ }
return Strings.isNullOrEmpty(data) ? null : JobProgress.init(data);
}
@Override
- public void deleteJobProgress(final long jobId) {
- log.info("delete job progress {}", jobId);
- registryRepository.delete(String.format("%s/%d/offset", ScalingConstant.SCALING_ROOT, jobId));
- }
-
- @Override
public void deleteJob(final long jobId) {
log.info("delete job {}", jobId);
registryRepository.delete(String.format("%s/%d", ScalingConstant.SCALING_ROOT, jobId));
diff --git a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/api/impl/ScalingAPIImpl.java b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/api/impl/ScalingAPIImpl.java
index e387d4d..cd2f64e 100644
--- a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/api/impl/ScalingAPIImpl.java
+++ b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/api/impl/ScalingAPIImpl.java
@@ -126,9 +126,8 @@ public final class ScalingAPIImpl implements ScalingAPI {
}
@Override
- public void reset(final long jobId) throws SQLException {
+ public void resetTargetTable(final long jobId) throws SQLException {
log.info("Scaling job {} reset target table", jobId);
- ScalingAPIFactory.getRegistryRepositoryAPI().deleteJobProgress(jobId);
new ScalingEnvironmentManager().resetTargetTable(new JobContext(getJobConfig(jobId)));
}
@@ -145,7 +144,7 @@ public final class ScalingAPIImpl implements ScalingAPI {
try {
return ScalingAPIFactory.getJobConfigurationAPI().getJobConfiguration(String.valueOf(jobId));
} catch (final NullPointerException ex) {
- throw new ScalingJobNotFoundException(String.format("Can not find scaling job %s", jobId), jobId);
+ throw new ScalingJobNotFoundException(String.format("Can not find scaling job %s", jobId));
}
}
}
diff --git a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/common/exception/ScalingJobNotFoundException.java b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/common/exception/ScalingJobNotFoundException.java
index bc614c4..217e6c0 100644
--- a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/common/exception/ScalingJobNotFoundException.java
+++ b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/common/exception/ScalingJobNotFoundException.java
@@ -17,20 +17,14 @@
package org.apache.shardingsphere.scaling.core.common.exception;
-import lombok.Getter;
-
/**
* Scaling job not found exception.
*/
-@Getter
public final class ScalingJobNotFoundException extends RuntimeException {
private static final long serialVersionUID = -903289953649758722L;
- private final long jobId;
-
- public ScalingJobNotFoundException(final String message, final long jobId) {
+ public ScalingJobNotFoundException(final String message) {
super(message);
- this.jobId = jobId;
}
}
diff --git a/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/api/impl/ScalingAPIImplTest.java b/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/api/impl/ScalingAPIImplTest.java
index d932eb2..bf742e1 100644
--- a/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/api/impl/ScalingAPIImplTest.java
+++ b/shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/api/impl/ScalingAPIImplTest.java
@@ -129,7 +129,7 @@ public final class ScalingAPIImplTest {
assertTrue(jobId.isPresent());
JobConfiguration jobConfig = scalingAPI.getJobConfig(jobId.get());
initTableData(jobConfig.getRuleConfig());
- scalingAPI.reset(jobId.get());
+ scalingAPI.resetTargetTable(jobId.get());
Map<String, DataConsistencyCheckResult> checkResultMap = scalingAPI.dataConsistencyCheck(jobId.get());
assertThat(checkResultMap.get("t_order").getTargetCount(), is(0L));
}
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/cases/assertion/IntegrationTestCase.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/cases/assertion/IntegrationTestCase.java
index 3f8e49b..e1eb832 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/cases/assertion/IntegrationTestCase.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/cases/assertion/IntegrationTestCase.java
@@ -41,9 +41,6 @@ public final class IntegrationTestCase {
@XmlAttribute(name = "db-types")
private String dbTypes;
- @XmlAttribute(name = "scenario-types")
- private String scenarioTypes;
-
@XmlElement(name = "assertion")
private Collection<IntegrationTestCaseAssertion> assertions = new LinkedList<>();
}
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/param/ParameterizedArrayFactory.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/param/ParameterizedArrayFactory.java
index 2715a12..d310763 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/param/ParameterizedArrayFactory.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/param/ParameterizedArrayFactory.java
@@ -33,9 +33,7 @@ import org.apache.shardingsphere.test.integration.engine.param.model.CaseParamet
import org.apache.shardingsphere.test.integration.engine.param.model.ParameterizedArray;
import org.apache.shardingsphere.test.integration.env.IntegrationTestEnvironment;
-import java.util.Arrays;
import java.util.Collection;
-import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.stream.Collectors;
@@ -106,9 +104,8 @@ public final class ParameterizedArrayFactory {
private static Collection<ParameterizedArray> getAssertionParameterizedArray(final IntegrationTestCaseContext testCaseContext, final IntegrationTestCaseAssertion assertion,
final String adapter, final DatabaseType databaseType,
final SQLExecuteType sqlExecuteType, final SQLCommandType sqlCommandType) {
- Collection<String> scenarios = null == testCaseContext.getTestCase().getScenarioTypes() ? Collections.emptyList() : Arrays.asList(testCaseContext.getTestCase().getScenarioTypes().split(","));
- return ENV.getScenarios().stream().filter(each -> scenarios.isEmpty() || scenarios.contains(each))
- .map(each -> new AssertionParameterizedArray(testCaseContext, assertion, adapter, each, databaseType, sqlExecuteType, sqlCommandType)).collect(Collectors.toList());
+ return ENV.getScenarios().stream().map(
+ each -> new AssertionParameterizedArray(testCaseContext, assertion, adapter, each, databaseType, sqlExecuteType, sqlCommandType)).collect(Collectors.toList());
}
/**
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/db/select_by_encrypt.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/db/select_by_encrypt.xml
deleted file mode 100644
index 00c36b1..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/db/select_by_encrypt.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<dataset>
- <metadata>
- <column name="user_id" />
- <column name="pwd" />
- </metadata>
- <row values="10, abc" />
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/db/select_in_encrypt.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/db/select_in_encrypt.xml
deleted file mode 100644
index 764cd76..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/db/select_in_encrypt.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<dataset>
- <metadata>
- <column name="user_id" />
- </metadata>
- <row values="10" />
- <row values="11" />
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/db/select_in_encrypt_without_pwd.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/db/select_in_encrypt_without_pwd.xml
deleted file mode 100644
index 30cd3db..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/db/select_in_encrypt_without_pwd.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<dataset>
- <metadata>
- <column name="user_id" />
- </metadata>
- <row values="10" />
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/db/select_in_or_encrypt.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/db/select_in_or_encrypt.xml
deleted file mode 100644
index 6379a43..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/db/select_in_or_encrypt.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<dataset>
- <metadata>
- <column name="user_id" />
- <column name="pwd" />
- </metadata>
- <row values="10, abc" />
- <row values="11, def" />
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/dbtbl_with_replica_query/select_by_encrypt.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/dbtbl_with_replica_query/select_by_encrypt.xml
deleted file mode 100644
index 00c36b1..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/dbtbl_with_replica_query/select_by_encrypt.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<dataset>
- <metadata>
- <column name="user_id" />
- <column name="pwd" />
- </metadata>
- <row values="10, abc" />
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/dbtbl_with_replica_query/select_in_encrypt.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/dbtbl_with_replica_query/select_in_encrypt.xml
deleted file mode 100644
index 764cd76..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/dbtbl_with_replica_query/select_in_encrypt.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<dataset>
- <metadata>
- <column name="user_id" />
- </metadata>
- <row values="10" />
- <row values="11" />
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/dbtbl_with_replica_query/select_in_encrypt_without_pwd.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/dbtbl_with_replica_query/select_in_encrypt_without_pwd.xml
deleted file mode 100644
index 30cd3db..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/dbtbl_with_replica_query/select_in_encrypt_without_pwd.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<dataset>
- <metadata>
- <column name="user_id" />
- </metadata>
- <row values="10" />
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/dbtbl_with_replica_query/select_in_or_encrypt.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/dbtbl_with_replica_query/select_in_or_encrypt.xml
deleted file mode 100644
index 6379a43..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/dbtbl_with_replica_query/select_in_or_encrypt.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<dataset>
- <metadata>
- <column name="user_id" />
- <column name="pwd" />
- </metadata>
- <row values="10, abc" />
- <row values="11, def" />
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/encrypt/select_by_encrypt.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/encrypt/select_by_encrypt.xml
deleted file mode 100644
index 00c36b1..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/encrypt/select_by_encrypt.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<dataset>
- <metadata>
- <column name="user_id" />
- <column name="pwd" />
- </metadata>
- <row values="10, abc" />
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/encrypt/select_in_encrypt.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/encrypt/select_in_encrypt.xml
deleted file mode 100644
index 764cd76..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/encrypt/select_in_encrypt.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<dataset>
- <metadata>
- <column name="user_id" />
- </metadata>
- <row values="10" />
- <row values="11" />
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/encrypt/select_in_encrypt_without_pwd.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/encrypt/select_in_encrypt_without_pwd.xml
deleted file mode 100644
index 30cd3db..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/encrypt/select_in_encrypt_without_pwd.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<dataset>
- <metadata>
- <column name="user_id" />
- </metadata>
- <row values="10" />
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/encrypt/select_in_or_encrypt.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/encrypt/select_in_or_encrypt.xml
deleted file mode 100644
index 6379a43..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/encrypt/select_in_or_encrypt.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<dataset>
- <metadata>
- <column name="user_id" />
- <column name="pwd" />
- </metadata>
- <row values="10, abc" />
- <row values="11, def" />
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/replica_query/select_by_encrypt.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/replica_query/select_by_encrypt.xml
deleted file mode 100644
index 00c36b1..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/replica_query/select_by_encrypt.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<dataset>
- <metadata>
- <column name="user_id" />
- <column name="pwd" />
- </metadata>
- <row values="10, abc" />
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/replica_query/select_in_encrypt.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/replica_query/select_in_encrypt.xml
deleted file mode 100644
index 764cd76..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/replica_query/select_in_encrypt.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<dataset>
- <metadata>
- <column name="user_id" />
- </metadata>
- <row values="10" />
- <row values="11" />
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/replica_query/select_in_encrypt_without_pwd.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/replica_query/select_in_encrypt_without_pwd.xml
deleted file mode 100644
index 30cd3db..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/replica_query/select_in_encrypt_without_pwd.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<dataset>
- <metadata>
- <column name="user_id" />
- </metadata>
- <row values="10" />
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/replica_query/select_in_or_encrypt.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/replica_query/select_in_or_encrypt.xml
deleted file mode 100644
index 6379a43..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/replica_query/select_in_or_encrypt.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<dataset>
- <metadata>
- <column name="user_id" />
- <column name="pwd" />
- </metadata>
- <row values="10, abc" />
- <row values="11, def" />
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/tbl/select_by_encrypt.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/tbl/select_by_encrypt.xml
deleted file mode 100644
index 00c36b1..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/tbl/select_by_encrypt.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<dataset>
- <metadata>
- <column name="user_id" />
- <column name="pwd" />
- </metadata>
- <row values="10, abc" />
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/tbl/select_in_encrypt.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/tbl/select_in_encrypt.xml
deleted file mode 100644
index 764cd76..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/tbl/select_in_encrypt.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<dataset>
- <metadata>
- <column name="user_id" />
- </metadata>
- <row values="10" />
- <row values="11" />
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/tbl/select_in_encrypt_without_pwd.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/tbl/select_in_encrypt_without_pwd.xml
deleted file mode 100644
index 30cd3db..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/tbl/select_in_encrypt_without_pwd.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<dataset>
- <metadata>
- <column name="user_id" />
- </metadata>
- <row values="10" />
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/tbl/select_in_or_encrypt.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/tbl/select_in_or_encrypt.xml
deleted file mode 100644
index 6379a43..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dataset/tbl/select_in_or_encrypt.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<dataset>
- <metadata>
- <column name="user_id" />
- <column name="pwd" />
- </metadata>
- <row values="10, abc" />
- <row values="11, def" />
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dql-integration-test-cases.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dql-integration-test-cases.xml
index 6fbeea3..4669795 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dql-integration-test-cases.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/dql/dql-integration-test-cases.xml
@@ -490,22 +490,6 @@
<test-case sql="SELECT * FROM t_user">
<assertion expected-data-file="select_encrypt.xml"/>
</test-case>
-
- <test-case sql="SELECT user_id, pwd FROM t_user WHERE pwd = 'abc'">
- <assertion expected-data-file="select_by_encrypt.xml"/>
- </test-case>
-
- <test-case sql="SELECT user_id FROM t_user WHERE pwd in ('abc', 'def')">
- <assertion expected-data-file="select_in_encrypt.xml"/>
- </test-case>
-
- <test-case sql="SELECT user_id FROM t_user WHERE pwd in ('abc', 'def') and user_id = 10">
- <assertion expected-data-file="select_in_encrypt_without_pwd.xml"/>
- </test-case>
-
- <test-case sql="SELECT * FROM t_user WHERE pwd in ('abc', 'def') OR user_id = 10">
- <assertion expected-data-file="select_in_or_encrypt.xml"/>
- </test-case>
<test-case sql="SELECT * FROM t_user u INNER JOIN t_order_item m ON u.user_id=m.user_id">
<assertion expected-data-file="select_join_encrypt.xml"/>