LakshSingla commented on code in PR #15032:
URL: https://github.com/apache/druid/pull/15032#discussion_r1345617208
##########
processing/src/main/java/org/apache/druid/query/IterableRowsCursorHelper.java:
##########
@@ -55,8 +64,10 @@ public static RowBasedCursor<Object[]>
getCursorFromIterable(Iterable<Object[]>
}
return row -> row[columnIndex];
};
- RowWalker<Object[]> rowWalker = new RowWalker<>(Sequences.simple(rows),
rowAdapter);
- return new RowBasedCursor<>(
+
+ RowWalker<Object[]> rowWalker = new RowWalker<>(rows, rowAdapter);
Review Comment:
Revisiting this comment, it doesn't seem fair that the `RowBasedCursor`
should close the `rowWalker` that was passed to it by the caller. The caller
should close the `rowWalker`.
Either the method `getCursorFromSequence` should return a Pair<Cursor,
Closeable> or I will rename `CloseableCursor` to `CursorWithCloseable`
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]