This is an automated email from the ASF dual-hosted git repository.

lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/main by this push:
     new 40f3372c fix(go/adbc/sqldriver): do not swallow array.RecordReader 
error (#641)
40f3372c is described below

commit 40f3372c19ddb3bdbf316cf35172a6b59f0d5852
Author: Jacob Marble <[email protected]>
AuthorDate: Tue May 2 14:24:00 2023 -0700

    fix(go/adbc/sqldriver): do not swallow array.RecordReader error (#641)
    
    In the `database/sql` `Rows.Next()` implementation, errors occurring
    within `array.RecordReader` were ignored, so that an error result
    appeared as an empty result.
---
 go/adbc/sqldriver/driver.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/go/adbc/sqldriver/driver.go b/go/adbc/sqldriver/driver.go
index 6cf65f49..44184032 100644
--- a/go/adbc/sqldriver/driver.go
+++ b/go/adbc/sqldriver/driver.go
@@ -580,6 +580,9 @@ func (r *rows) Next(dest []driver.Value) error {
 
        for r.curRecord == nil {
                if !r.rdr.Next() {
+                       if err := r.rdr.Err(); err != nil {
+                               return err
+                       }
                        return io.EOF
                }
                r.curRecord = r.rdr.Record()

Reply via email to