zeroshade commented on code in PR #366:
URL: https://github.com/apache/arrow-go/pull/366#discussion_r2070846167
##########
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:
Is there an easy way to add a test case for this?
--
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]