xiangfu0 commented on code in PR #20081:
URL: https://github.com/apache/pinot/pull/20081#discussion_r4408912062
##########
pinot-plugins/pinot-input-format/pinot-parquet/src/main/java/org/apache/pinot/plugin/inputformat/parquet/ParquetAvroRecordReader.java:
##########
@@ -78,7 +78,7 @@ public GenericRow next(GenericRow reuse)
// Advance even if extraction fails and the caller skips the rejected
record.
try {
_nextRecord = _parquetReader.read();
- } catch (IOException e) {
+ } catch (Exception e) {
Review Comment:
**MAJOR (test gap):** No test covers this change. #20065 asks for tests of
the retained cause, bounded termination at the fetch-failure threshold, and the
existing rejected-row/rewind behavior. One way: swap `_parquetReader` for a
`ParquetReader` subclass whose `read()` throws `ParquetDecodingException`. Then
assert that `next()` throws `RecordFetchException` with that cause and that
`hasNext()` stays true. Against `master` that check fails (I tried it locally),
so it pins this fix.
##########
pinot-plugins/pinot-input-format/pinot-parquet/src/main/java/org/apache/pinot/plugin/inputformat/parquet/ParquetAvroRecordReader.java:
##########
@@ -78,7 +78,7 @@ public GenericRow next(GenericRow reuse)
// Advance even if extraction fails and the caller skips the rejected
record.
try {
_nextRecord = _parquetReader.read();
- } catch (IOException e) {
+ } catch (Exception e) {
throw new RecordFetchException("Failed to read next Parquet Avro
record", e);
Review Comment:
**MINOR:** If `extract()` throws and this prefetch also fails, the exception
thrown from `finally` drops the extraction error completely. I confirmed it
isn't kept as a suppressed exception either. This predates the PR, but the
wider catch now covers every read failure. Catching the extraction failure and
calling `addSuppressed` on the `RecordFetchException` would keep it in the logs.
--
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]