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/09/16 04:46:08 UTC

[GitHub] [shardingsphere] strongduanmu commented on a change in pull request #7469: refactor CallStatement, DeleteStatement and DoStatement in DMLStatement

strongduanmu commented on a change in pull request #7469:
URL: https://github.com/apache/shardingsphere/pull/7469#discussion_r489158651



##########
File path: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-route/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/impl/ShardingDeleteStatementValidator.java
##########
@@ -42,7 +44,7 @@ public void preValidate(final ShardingRule shardingRule, final RouteContext rout
     
     @Override
     public void postValidate(final DeleteStatement sqlStatement, final RouteResult routeResult) {
-        if (sqlStatement.getLimit().isPresent() && routeResult.getRouteUnits().size() > 1) {
+        if (sqlStatement instanceof MySQLStatement && ((MySQLDeleteStatement) sqlStatement).getLimit().isPresent() && routeResult.getRouteUnits().size() > 1) {

Review comment:
       > Extracting a function is better.
   
   @tristaZero I will optimize it.




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