You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@parquet.apache.org by "wgtmac (via GitHub)" <gi...@apache.org> on 2024/05/23 05:57:53 UTC

Re: [PR] PARQUET-2477: close readers opened by ParquetFileWriter [parquet-java]

wgtmac commented on code in PR #1351:
URL: https://github.com/apache/parquet-java/pull/1351#discussion_r1611044385


##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileWriter.java:
##########
@@ -1433,12 +1436,14 @@ public void endBlock() throws IOException {
   public void appendFile(Configuration conf, Path file) throws IOException {
     try (ParquetFileReader reader = ParquetFileReader.open(conf, file)) {
       reader.appendTo(this);
+      readers.add(reader);

Review Comment:
   IIUC, ParquetFileReader implements AutoCloseable which should be closed automatically when the current scope has ended. Could you help investigate why it is not called on Windows? I have concern that this fix might hide the root cause forever.



-- 
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: issues-unsubscribe@parquet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org