clintropolis opened a new pull request #11556: URL: https://github.com/apache/druid/pull/11556
Fixes #10784. ### Description This PR does the ugly/easy fix to `FilteringCloseableInputRowIterator` to better handle `ParseException` thrown during iteration, due to the fact that some transforming iterators will call `next` on their delegated iterator whenever their own `hasNext` method is called. The trigger in the case of #10784 is the `FluentIterable` transform used by `StreamChunkParser.parseWithParser`, but I would imagine that others are possible due to all the layers of iterators. Switching the iterator to be `Pair<InputRow, ParseException>` would be a fairly disruptive change as far as I can tell, because its sort of iterators all the way down. This would be changing the individual parsers/format readers to mean not throwing ParseException, unless I'm missing something, making it similar to the `sample` interface, which uses `InputRowListPlusRawValues` to provide an iterator of lists of rows, or a parse exception. This isn't necessarily unreasonable to do, but significantly more effort than making this change. <hr> This PR has: - [x] been self-reviewed. - [x] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader. - [x] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met. - [x] been tested in a test Druid cluster. -- 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]
