AMashenkov commented on code in PR #2789:
URL: https://github.com/apache/ignite-3/pull/2789#discussion_r1394345429
##########
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:
Why do you complete future with `null` value? Is it a kind of special value?
Why don't return a cursor over empty collection?
--
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]