zeroshade commented on code in PR #36646:
URL: https://github.com/apache/arrow/pull/36646#discussion_r1261444537
##########
go/parquet/file/file_writer.go:
##########
@@ -165,7 +166,9 @@ func (fw *Writer) Close() error {
fw.rowGroupWriter.Close()
}
fw.rowGroupWriter = nil
- defer fw.sink.Close()
+ defer func() {
+ err = errors.Join(err, fw.sink.Close())
Review Comment:
if `err` is already non-nil, you're gonna swallow it here. You should
probably check if it is already nil and if it isn't then you should chain the
errors together.
to do so you'll need to remove the `var err error` from line 175 so it
doesn't shadow the return variable
--
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]