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 2020/12/10 05:57:07 UTC

[GitHub] [shardingsphere] wgy8283335 commented on a change in pull request #8512: Modify prevalidate and post validate method.

wgy8283335 commented on a change in pull request #8512:
URL: https://github.com/apache/shardingsphere/pull/8512#discussion_r539865600



##########
File path: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-route/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingInsertStatementValidator.java
##########
@@ -90,5 +94,8 @@ private boolean isAllSameTables(final Collection<String> tableNames) {
     
     @Override
     public void postValidate(final InsertStatement sqlStatement, final RouteContext routeContext) {
+        if (needCheckShardingKey) {
+            Preconditions.checkState(routeContext.getRouteUnits().size() > 0, "Sharding value must same with subquery.");

Review comment:
       I'd like to change the  variable name.




----------------------------------------------------------------
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