You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "FredGan (Jira)" <ji...@apache.org> on 2020/07/14 13:00:02 UTC
[jira] [Created] (ARROW-9463) [Go] The writer is double closed in
TestReadWrite
FredGan created ARROW-9463:
------------------------------
Summary: [Go] The writer is double closed in TestReadWrite
Key: ARROW-9463
URL: https://issues.apache.org/jira/browse/ARROW-9463
Project: Apache Arrow
Issue Type: Test
Components: Go
Affects Versions: 0.17.1
Reporter: FredGan
The writer in the test case 'TestReadWrite' is double closed.
{code:java}
w, err := NewWriter(f, recs[0].Schema())
if err != nil {
t.Fatal(err)
}
defer w.Close() // <= Here
for i, rec := range recs {
err = w.Write(rec)
if err != nil {
t.Fatalf("could not write record[%d] to JSON: %v", i, err)
}
}
err = w.Close() // <= Here
if err != nil {
t.Fatalf("could not close JSON writer: %v", err)
}
{code}
The 'defer w.Close()' is redundant, which makes one more ']}' in the end of the output json file .
--
This message was sent by Atlassian Jira
(v8.3.4#803005)