fallintoplace opened a new pull request, #990:
URL: https://github.com/apache/arrow-go/pull/990

   ### Rationale for this change
   
   `database/sql` reports errors encountered while advancing through a result 
set through `Rows.Err()` after `Rows.Next()` returns false. 
`SqlBatchReader.Next()` did not check that error, so a driver failure after one 
or more rows could be returned as a successful partial batch while 
`SqlBatchReader.Err()` stayed nil.
   
   ### What changes are included in this PR?
   
   Check `Rows.Err()` after the iteration loop and return the error before 
constructing a record batch.
   
   Add a regression test with a small database driver that returns one row and 
then fails during iteration.
   
   ### Are these changes tested?
   
   Yes. `go test ./arrow/flight/flightsql/example` and the focused race test 
pass.
   
   ### Are there any user-facing changes?
   
   Flight SQL example servers now propagate database row iteration failures 
instead of returning partial results as successful batches. Successful queries 
are unchanged.


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