xtern commented on code in PR #1866:
URL: https://github.com/apache/ignite-3/pull/1866#discussion_r1154235553


##########
modules/client-handler/src/main/java/org/apache/ignite/client/handler/JdbcQueryEventHandlerImpl.java:
##########
@@ -228,16 +227,25 @@ public CompletableFuture<JdbcBatchExecuteResult> 
batchPrepStatementAsync(
         });
     }
 
-    private CompletableFuture<Long> executeAndCollectUpdateCount(String 
schema, String sql, Object[] arg) {
+    private CompletableFuture<Long> executeAndCollectUpdateCount(long 
connectionId, String sql, Object[] arg) {
         var context = 
createQueryContext(JdbcStatementType.UPDATE_STATEMENT_TYPE);
 
-        var cursors = processor.queryAsync(context, schema, sql, arg);
-
-        if (cursors.size() != 1) {
-            return CompletableFuture.failedFuture(new 
IgniteInternalException("Multi statement queries are not supported in 
batching"));
+        JdbcConnectionContext connectionContext;
+        try {
+            connectionContext = 
resources.get(connectionId).get(JdbcConnectionContext.class);

Review Comment:
   Maybe it would be better to move this code into a separate method and use it 
from `queryAsync` as well, instead of duplicating the same try/catch block.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to