suryaprasanna opened a new pull request, #18407: URL: https://github.com/apache/hudi/pull/18407
### Describe the issue this Pull Request addresses Parquet readers created through `ParquetReaderIterator` may remain open after all records are consumed unless callers explicitly close the iterator. This can leave readers open longer than necessary, especially in merge-related flows that exhaust the iterator and then continue processing. ### Summary and Changelog Auto-close the underlying parquet reader when `ParquetReaderIterator` reaches EOF. - close the wrapped `ParquetReader` when `hasNext()` detects there are no more records - update the iterator unit test to cover the EOF close behavior ### Impact No public API change. This is an internal resource management improvement that helps release parquet readers promptly after iteration completes. ### Risk Level low This change is limited to iterator cleanup behavior at end-of-stream. The existing unit test was updated to validate the close-on-EOF behavior. ### Documentation Update none ### Contributor's checklist - [x] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [x] Enough context is provided in the sections above - [x] Adequate tests were added if applicable -- 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]
