xtern commented on code in PR #2846:
URL: https://github.com/apache/ignite-3/pull/2846#discussion_r1411784759
##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/AsyncSqlCursorImplTest.java:
##########
@@ -51,7 +52,7 @@ public class AsyncSqlCursorImplTest {
/** Cursor should trigger commit of implicit transaction (if any) only if
data is fully read. */
@ParameterizedTest(name = "{0}")
@MethodSource("transactions")
- public void testTriggerCommitAfterDataIsFullyRead(boolean implicit,
QueryTransactionWrapper txWrapper) {
+ public void testTriggerCommitAfterDataIsFullyRead(boolean implicit,
QueryTransactionWrapperImpl txWrapper) {
Review Comment:
Fixed, thanks.
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/SqlQueryProcessor.java:
##########
@@ -681,66 +661,92 @@ private static void validateDynamicParameters(int
expectedParamsCount, Object[]
}
}
+ /** Returns count of opened cursors. */
+ @TestOnly
+ public int openedCursors() {
+ return openedCursors.size();
+ }
+
private class MultiStatementHandler {
private final String schemaName;
- private final IgniteTransactions transactions;
- private final @Nullable InternalTransaction explicitTransaction;
+ private final ScriptTransactionHandler transactionHandler;
private final Queue<ScriptStatementParameters> statements;
MultiStatementHandler(
String schemaName,
- IgniteTransactions transactions,
- @Nullable InternalTransaction explicitTransaction,
+ ScriptTransactionHandler transactionHandler,
List<ParsedResult> parsedResults,
Object[] params
) {
this.schemaName = schemaName;
- this.transactions = transactions;
- this.explicitTransaction = explicitTransaction;
+ this.transactionHandler = transactionHandler;
this.statements = prepareStatementsQueue(parsedResults, params);
}
- CompletableFuture<AsyncSqlCursor<List<Object>>> processNext() {
- if (statements == null) {
- // TODO https://issues.apache.org/jira/browse/IGNITE-20463
Each tx control statement must return an empty cursor.
- return CompletableFuture.completedFuture(null);
+ /**
+ * Returns a queue. each element of which represents parameters
required to execute a single statement of the script.
+ */
+ private Queue<ScriptStatementParameters>
prepareStatementsQueue(List<ParsedResult> parsedResults0, Object[] params) {
Review Comment:
Fixed, thanks.
--
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]