You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "David Li (Jira)" <ji...@apache.org> on 2021/11/18 14:27:00 UTC

[jira] [Created] (ARROW-14769) [Go] Errors from MessageReader.Message don't get surfaced by Reader.Read

David Li created ARROW-14769:
--------------------------------

             Summary: [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


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)