Files opened by ParquetFileWriter’s appendFile method should to be closed correctly
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 1.6k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 33
Description
I try to use the `appendFile` method of `ParquetFileWriter` to merge some smaller Parquet files into one large parquet file. After I finished the merge, I tried deleting the smaller files, but couldn't actually delete them.
After reading the ParquetFileWriter source code, I found that the file he opened was not closed in the end method, which seemed unreasonable.
When testing on `Windows`, it was found that these implicitly opened files cannot be deleted or renamed. This seems to be related to Windows file handles. But it's worked fine on macOS.
Anyway, I will submit a patch to ensure that files opened through the appendFile function are closed correctly.
**Reporter**: [Deng An](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=packyan)
#### PRs and other links:
- [GitHub Pull Request #1351](https://github.com/apache/parquet-java/pull/1351)
- [GitHub Pull Request #1351](https://github.com/apache/parquet-mr/pull/1351)
**Note**: *This issue was originally created as [PARQUET-2477](https://issues.apache.org/jira/browse/PARQUET-2477). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.