You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "omixen (via GitHub)" <gi...@apache.org> on 2023/07/12 17:14:27 UTC
[GitHub] [arrow] omixen commented on a diff in pull request #36646: GH-36645: [Go] returns writer.Close error to caller when writing parquet
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org