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 2019/11/18 09:32:25 UTC

[GitHub] [incubator-shardingsphere] SteNicholas commented on a change in pull request #3547: `getResultSet` should return null after `executeUpdate`

SteNicholas commented on a change in pull request #3547: `getResultSet` should return null after `executeUpdate`
URL: https://github.com/apache/incubator-shardingsphere/pull/3547#discussion_r347273979
 
 

 ##########
 File path: sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/statement/ShardingStatement.java
 ##########
 @@ -113,7 +113,19 @@ public ResultSet getResultSet() throws SQLException {
         for (Statement each : statementExecutor.getStatements()) {
             ResultSet resultSet = each.getResultSet();
             resultSets.add(resultSet);
-            queryResults.add(new StreamQueryResult(resultSet, connection.getRuntimeContext().getRule(), connection.getRuntimeContext().getProps(), sqlRouteResult.getSqlStatementContext()));
+            if (resultSet != null) {
+                queryResults.add(new StreamQueryResult(resultSet, connection.getRuntimeContext().getRule(), connection.getRuntimeContext().getProps(), sqlRouteResult.getSqlStatementContext()));
+            }
+        }
+        boolean allResultSetAreNull = true;
 
 Review comment:
   这个判断可以优化下吧?

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


With regards,
Apache Git Services