codewithsruthi opened a new pull request, #20390:
URL: https://github.com/apache/pinot/pull/20390
## Description
Fixes #20065
`ParquetAvroRecordReader.next()` previously caught only `IOException` around
the prefetch read (`_parquetReader.read()`), allowing unchecked exceptions such
as `ParquetDecodingException` (from `parquet-hadoop`) to escape unclassified.
In `SegmentMapper`, those failures were treated as parse errors instead of
fetch errors, bypassing `maxConsecutiveRecordFetchFailuresAllowed` when
`continueOnError=true`.
### Changes
- **`ParquetAvroRecordReader`**:
- Widened the prefetch `catch` block in `next(GenericRow)` from
`IOException` to `Exception` and wrapped prefetch failures as
`RecordFetchException` (retaining the original cause and avoiding
double-wrapping), matching `ParquetNativeRecordReader`.
- Preserved extraction failures from `_recordExtractor.extract(...)` as
parse errors (unwrapped) while advancing `_nextRecord`.
- If both extraction and prefetch fail on the same call, throws
`RecordFetchException` with the extraction failure attached via `addSuppressed`
(and skips prefetching on JVM `Error`s).
- Extracted `@VisibleForTesting readNextRecord()` to allow injecting read
failures in unit tests.
- **`ParquetAvroRecordReaderTest`**:
- Added unit tests covering unchecked `ParquetDecodingException` prefetch
wrapping with retained cause, checked `IOException` wrapping, bounded
termination at a configured consecutive fetch-failure threshold, extraction
failure preservation + cursor advancement, dual extraction/prefetch failure
suppression, and rejected INT96 row + `rewind()` behavior.
### Testing
- `./mvnw spotless:apply -pl pinot-plugins/pinot-input-format/pinot-parquet`
- `./mvnw license:format -pl pinot-plugins/pinot-input-format/pinot-parquet`
- `./mvnw checkstyle:check -pl
pinot-plugins/pinot-input-format/pinot-parquet`
- `./mvnw license:check -pl pinot-plugins/pinot-input-format/pinot-parquet`
- `./mvnw -pl pinot-plugins/pinot-input-format/pinot-parquet -am
-Dtest=ParquetAvroRecordReaderTest,ParquetReaderLogicalTypesTest,ParquetRecordReaderTest
-Dsurefire.failIfNoSpecifiedTests=false test` (17/17 passed)
--
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]