emkornfield commented on a change in pull request #9862:
URL: https://github.com/apache/arrow/pull/9862#discussion_r606822392



##########
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 like panic is used in existing code, this seems strange to me 
though.




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


Reply via email to