You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/05/21 07:49:52 UTC
[GitHub] [shardingsphere] tristaZero commented on a change in pull request #10418: Add TODO for DropShardingTableRuleBackendHandler
tristaZero commented on a change in pull request #10418:
URL: https://github.com/apache/shardingsphere/pull/10418#discussion_r636710827
##########
File path: shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropShardingTableRuleBackendHandler.java
##########
@@ -65,10 +66,12 @@ private ShardingRuleConfiguration check(final String schemaName, final Collectio
if (!notExistedTableNames.isEmpty()) {
throw new ShardingTableRuleNotExistedException(notExistedTableNames);
}
- Collection<String> inUsedTableNames = tableNames.stream().filter(each -> ProxyContext.getInstance().getMetaData(schemaName).getSchema().containsTable(each)).collect(Collectors.toList());
- if (!inUsedTableNames.isEmpty()) {
- throw new TablesInUsedException(inUsedTableNames);
- }
+ // TODO
+ // 1. get binding tables by getBindingTables()
+ // 2. Check whether the dropped table rules exist in the binding table rule
+ // 3. throw ShardingTableRulesInUsedException if exist
+ // 4. refactor check() method to return void
Review comment:
The details of TODO-task can be described in its issue, here we can just keep
// TODO
or
// TODO # ISSUE_NUMBER
or
// TODO, SOME COMMENTS
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org