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 2022/01/26 06:21:55 UTC

[GitHub] [shardingsphere] TeslaCN commented on a change in pull request #15045: Migrate type of execute results to List in proxy backend

TeslaCN commented on a change in pull request #15045:
URL: https://github.com/apache/shardingsphere/pull/15045#discussion_r792340382



##########
File path: shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/JDBCDatabaseCommunicationEngine.java
##########
@@ -129,8 +129,8 @@ public ResponseHeader execute() {
         refreshMetaData(executionContext);
         ExecuteResult executeResultSample = result.iterator().next();
         return executeResultSample instanceof QueryResult
-                ? processExecuteQuery(executionContext, result.stream().map(each -> (QueryResult) each).collect(Collectors.toList()), (QueryResult) executeResultSample)
-                : processExecuteUpdate(executionContext, result.stream().map(each -> (UpdateResult) each).collect(Collectors.toList()));
+                ? processExecuteQuery(executionContext, (List) result, (QueryResult) executeResultSample)
+                : processExecuteUpdate(executionContext, (List) result);

Review comment:
       @terrymanu I've migrated some Collection to List. But I have to use raw type because the List in method's parameter accepts different generic types.




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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org