omixen commented on code in PR #36646:
URL: https://github.com/apache/arrow/pull/36646#discussion_r1261480135


##########
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:
   I'll remove declaration in line 175. However, the `errors.Join` should 
already does the nil check here.
   here's a playground with all the cases: https://go.dev/play/p/herxEQMzsIb
   
   if I misunderstood, please let me know.



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