Copilot commented on code in PR #55703:
URL: https://github.com/apache/arrow/pull/55703#discussion_r4651729253
##########
c_glib/parquet-glib/arrow-file-reader.cpp:
##########
@@ -456,6 +487,13 @@ gparquet_arrow_file_reader_close(GParquetArrowFileReader
*reader)
if (parquet_reader) {
parquet_reader->Close();
}
+ auto priv = GPARQUET_ARROW_FILE_READER_GET_PRIVATE(reader);
+ if (priv->owned_source) {
+ // We ignore an error because this is a void function. The
+ // reader can't be used after this anyway.
+ auto status = priv->owned_source->Close();
Review Comment:
After `read_table` or `read_row_group` with default pre-buffering,
`reader.close` leaves mapped buffers in the native reader's cache, so Windows
file deletion can still fail until the reader is destroyed. Neither
`ParquetFileReader::Close()` nor closing the source releases that cache.
Release the reader-owned cached buffers during close, and add a regression that
reads data, closes the reader, then deletes the file before `unref` or GC.
--
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]