murfffi opened a new issue, #2636:
URL: https://github.com/apache/arrow-adbc/issues/2636

   ### What feature or improvement would you like to see?
   
   It will be nice to support reading from union columns from databases that 
support them when using the `database/sql` adapter. 
   
   For example, in DuckDB, this should work:
   
   ```go
   // Register "duckdb" as described in 
https://pkg.go.dev/github.com/apache/arrow-adbc/go/adbc/sqldriver
   // Error handling and closing resources omitted for brevity
   db, err := sql.Open("duckdb", "")
   _, err = db.Exec("create table test(a union(u varchar, v int))")
   _, err = db.Exec("insert into test values('aba'),(2)")
   rows, err := db.Query("select * from test")
   for rows.Next() {
        var s any
        err = rows.Scan(&s)
           fmt.Println(s)        
   }
   if rows.Err() != nil {
      fmt.Println(rows.Err())
   }
   ```
   
   This should print:
   
   ```
   aba
   2
   ```
   
   but currently prints:
   
   ```
   Not Implemented: not yet implemented populating from columns of type 
sparse_union<u: type=utf8, nullable=0, v: type=int32, nullable=1>
   ```
   
   I have a draft PR ready if the enhancement makes sense.


-- 
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: issues-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to