gianm commented on a change in pull request #11890:
URL: https://github.com/apache/druid/pull/11890#discussion_r745950985
##########
File path: processing/src/main/java/org/apache/druid/segment/RowWalker.java
##########
@@ -60,13 +61,16 @@ public T currentRow()
public void advance()
{
- if (rowIterator.hasNext()) {
+ if (rowIterator == null) {
+ throw new IllegalStateException("cannot call advance when isDone ==
true");
+ } else if (rowIterator.hasNext()) {
current = rowIterator.next();
if (current == null) {
throw new NullPointerException("null row encountered in walker");
}
} else {
+ rowIterator = null;
Review comment:
Makes sense to me, but that's gonna get changed in #11886 anyway.
--
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]