strongduanmu commented on a change in pull request #6377:
URL: https://github.com/apache/shardingsphere/pull/6377#discussion_r456920405
##########
File path:
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-route/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/ShardingRouteEngineFactory.java
##########
@@ -94,6 +96,15 @@ public static ShardingRouteEngine newInstance(final
ShardingRule shardingRule, f
return getShardingRoutingEngine(shardingRule, sqlStatementContext,
shardingConditions, tableNames, props);
}
+ private static Collection<String> getTableNames(final SQLStatementContext
sqlStatementContext) {
+ Collection<String> tableNames = new
LinkedList<>(sqlStatementContext.getTablesContext().getTableNames());
+ if (sqlStatementContext instanceof InsertStatementContext && null !=
((InsertStatementContext) sqlStatementContext).getInsertSelectContext()) {
Review comment:
@tristaZero This change was originally for verifying the binding table,
maybe revert it is a better choice. The binding table is more suitable for
performing verification in ShardingInsertStatementValidator.
----------------------------------------------------------------
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:
[email protected]