zeroshade commented on a change in pull request #11739:
URL: https://github.com/apache/arrow/pull/11739#discussion_r752593970



##########
File path: go/arrow/ipc/reader.go
##########
@@ -196,7 +196,9 @@ func (r *Reader) Read() (array.Record, error) {
        }
 
        if !r.next() {
-               if r.done {
+               if r.err != nil {
+                       return nil, r.err
+               } else if r.done {
                        return nil, io.EOF
                }
                return nil, r.err

Review comment:
       How would my example return `io.EOF` in the case of an error? By doing 
`if r.done && r.err == nil` we only return the `io.EOF` if there isn't an error 
to return.




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