ashishnegi commented on code in PR #366: URL: https://github.com/apache/arrow-go/pull/366#discussion_r2071742555
########## parquet/file/column_writer.go: ########## @@ -422,9 +422,12 @@ func (w *columnWriter) FlushBufferedDataPages() (err error) { } } - for _, p := range w.pages { + for i, p := range w.pages { defer p.Release() if err = w.WriteDataPage(p); err != nil { + // To keep pages in consistent state, + // remove the pages that will be released using above defer call. + w.pages = w.pages[i+1:] return err } } Review Comment: Added a unit test and updated PR description. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org