Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-14769

[Go] Errors from MessageReader.Message don't get surfaced by Reader.Read

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 7.0.0
    • Go

    Description

      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.

      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
      }

      Attachments

        Issue Links

          Activity

            People

              lidavidm David Li
              lidavidm David Li
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 20m
                  2h 20m