emkornfield commented on a change in pull request #9862: URL: https://github.com/apache/arrow/pull/9862#discussion_r606823748
########## File path: go/arrow/ipc/file_reader.go ########## @@ -348,10 +356,26 @@ func (src *ipcSource) buffer(i int) *memory.Buffer { return memory.NewBufferBytes(nil) } - raw := make([]byte, buf.Length()) - _, err := src.r.ReadAt(raw, buf.Offset()) - if err != nil { - panic(err) + var raw []byte + if src.codec == nil { + raw = make([]byte, buf.Length()) + _, err := src.r.ReadAt(raw, buf.Offset()) + if err != nil { + panic(err) Review comment: seems OK to me. I don't know Go well enough but for IO related code I would expect failures at least some of the time and I thought panic was meant for actual "stop the entire program" type errors. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org