korlov42 commented on code in PR #2811:
URL: https://github.com/apache/ignite-3/pull/2811#discussion_r1387852493
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/api/SessionImpl.java:
##########
@@ -447,8 +500,27 @@ private void touchAndCloseIfExpired() {
}
}
+ private int registerCursor(AsyncSqlCursor<?> cursor) {
+ int cursorId = cursorIdGen.incrementAndGet();
+
+ Object old = openedCursors.put(cursorId, cursor);
+
+ assert old == null;
+
+ return cursorId;
+ }
+
+ private static SqlException sessionIsClosedException() {
+ return new SqlException(SESSION_CLOSED_ERR, "Session is closed.");
+ }
+
@FunctionalInterface
interface SessionBuilderFactory {
SessionBuilder fromProperties(Map<String, Object> properties);
}
+
+ @TestOnly
+ List<AsyncSqlCursor<?>> openedCursors() {
Review Comment:
if it's matter of taste (you don't have strong reason to hide cursors), then
I would prefer to leave it as is
--
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]