This is an automated email from the ASF dual-hosted git repository.

sunnianjun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 7a8b73deb73 Refactor DatabaseConnector (#32443)
7a8b73deb73 is described below

commit 7a8b73deb73de2cf68e4dd2a34e9295744b81eab
Author: Liang Zhang <[email protected]>
AuthorDate: Fri Aug 9 17:47:30 2024 +0800

    Refactor DatabaseConnector (#32443)
---
 .../shardingsphere/proxy/backend/connector/DatabaseConnector.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/connector/DatabaseConnector.java
 
b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/connector/DatabaseConnector.java
index 3f0fcb87f9a..91e888c0c42 100644
--- 
a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/connector/DatabaseConnector.java
+++ 
b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/connector/DatabaseConnector.java
@@ -242,8 +242,8 @@ public final class DatabaseConnector implements 
DatabaseBackendHandler {
         refreshMetaData(executionContext);
         Object executeResultSample = result.iterator().next();
         return executeResultSample instanceof QueryResult
-                ? processExecuteQuery(queryContext.getSqlStatementContext(), 
result.stream().map(each -> (QueryResult) each).collect(Collectors.toList()), 
(QueryResult) executeResultSample)
-                : processExecuteUpdate(result.stream().map(each -> 
(UpdateResult) each).collect(Collectors.toList()));
+                ? processExecuteQuery(queryContext.getSqlStatementContext(), 
result.stream().map(QueryResult.class::cast).collect(Collectors.toList()), 
(QueryResult) executeResultSample)
+                : 
processExecuteUpdate(result.stream().map(UpdateResult.class::cast).collect(Collectors.toList()));
     }
     
     private ResultSet doExecuteFederation() {

Reply via email to