kou opened a new pull request, #55703:
URL: https://github.com/apache/arrow/pull/55703

   ### Rationale for this change
   
   `gparquet_arrow_file_reader_new_path()` and
   `gparquet_arrow_file_reader_new_path_full()` open the given path as a memory 
mapped file. But `gparquet_arrow_file_reader_close()` doesn't close it because 
`parquet::ParquetFileReader::Close()` doesn't close its source. So the file is 
kept open until the reader is GC-ed. We can't remove the file on Windows while 
it's open. This is why `TestBooleanStatistics` in Red Parquet fails randomly on 
Windows: it depends on `GC.start` freeing the reader.
   
   ### What changes are included in this PR?
   
   `gparquet_arrow_file_reader_close()` closes the file opened by the reader 
now. The source passed to `gparquet_arrow_file_reader_new_arrow()` and 
`gparquet_arrow_file_reader_new_arrow_full()` isn't closed because it's owned 
by the caller.
   
   ### Are these changes tested?
   
   Yes.
   
   ### Are there any user-facing changes?
   
   Yes.
   
   ### Was AI used for this PR?
   
   In accordance to the [AI generation 
guidelines](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code),
 please disclose below whether and how AI was used in this PR.
   
   **PR code and description written by:**
   
   - [x] Human
   - [x] AI
   
   **Reviewed before submission by:**
   
   - [x] Human
   - [x] AI
   - [ ] Not reviewed
   
   * GitHub Issue: (filled in automatically from the PR title)
   


-- 
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]

Reply via email to