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


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/SqlQueryProcessor.java:
##########
@@ -535,4 +612,156 @@ private static void validateParsedStatement(
             }
         }
     }
+
+    private class MultiStatementHandler {
+        private final String schemaName;
+        private final IgniteTransactions transactions;
+        private final @Nullable InternalTransaction explicitTransaction;
+        private final Queue<ScriptStatementParameters> statements;
+
+        MultiStatementHandler(
+                String schemaName,
+                IgniteTransactions transactions,
+                @Nullable InternalTransaction explicitTransaction,
+                List<ParsedResult> parsedResults,
+                Object[] params
+        ) {
+            this.schemaName = schemaName;
+            this.transactions = transactions;
+            this.explicitTransaction = explicitTransaction;
+            this.statements = prepareStatementsQueue(parsedResults, params);
+        }
+
+        CompletableFuture<AsyncSqlCursor<List<Object>>> processNext() {
+            if (statements == null) {
+                return CompletableFuture.completedFuture(null);
+            }

Review Comment:
   Yes, in current implementation this is a special case - as it described in 
javadoc
   ```
        * @return Sql cursor or {@code null} if specified SQL query does not 
create cursors
         *         (for example, if it contains only commands for managing a 
transaction).
   ```



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