pan3793 opened a new pull request, #3208: URL: https://github.com/apache/parquet-java/pull/3208
<!-- Thanks for opening a pull request! If you're new to Parquet-Java, information on how to contribute can be found here: https://parquet.apache.org/docs/contribution-guidelines/contributing Please open a GitHub issue for this pull request: https://github.com/apache/parquet-java/issues/new/choose and format pull request title as below: GH-${GITHUB_ISSUE_ID}: ${SUMMARY} or simply use the title below if it is a minor issue: MINOR: ${SUMMARY} --> ### Rationale for this change This allows the caller to reuse the `SeekableInputStream` but avoid leaking other resources held by `ParquetFileReader`, for example, in Spark Parquet vectorized reading code path, it opens two times for each Parquet file: 1. the first time opens and reads the footer, do some pruning and push down stuff. 2. the second time opens and reads the row groups it's possible to reuse the `SeekableInputStream` to reduce the NameNode RPC ### What changes are included in this PR? Providing an additional `close` method for `ParquetFileReader` that accepts `boolean closeFileInputStream`. ### Are these changes tested? N/A ### Are there any user-facing changes? No. <!-- Please uncomment the line below and replace ${GITHUB_ISSUE_ID} with the actual Github issue id. --> Closes #3207 -- 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]
