[ 
https://issues.apache.org/jira/browse/ARROW-14769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Krisztian Szucs resolved ARROW-14769.
-------------------------------------
    Fix Version/s: 7.0.0
       Resolution: Fixed

Issue resolved by pull request 11739
[https://github.com/apache/arrow/pull/11739]

> [Go] Errors from MessageReader.Message don't get surfaced by Reader.Read
> ------------------------------------------------------------------------
>
>                 Key: ARROW-14769
>                 URL: https://issues.apache.org/jira/browse/ARROW-14769
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Go
>            Reporter: David Li
>            Assignee: David Li
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 7.0.0
>
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> Noticed while playing with a Flight client. This snippet inadvertently 
> suppresses all errors that come from the underlying MessageReader since 
> {{next}} sets {{done}} after an error is encountered.
> {code:go}
> func (r *Reader) Read() (array.Record, error) {
>       if r.rec != nil {
>               r.rec.Release()
>               r.rec = nil
>       }
>       if !r.next() {
>                 // r.done is set if next() errors, so we always
>                 // return EOF instead of the actual error
>               if r.done {
>                       return nil, io.EOF
>               }
>               return nil, r.err
>       }
>       return r.rec, nil
> }{code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to