aotarola commented on issue #384:
URL: https://github.com/apache/arrow-go/issues/384#issuecomment-2902277289

   @zeroshade Got it! I'll investigate more the ADBC path, since seems an 
interesting way of doing it.
   
   Regarding the `go-duckdb` implementation, I did this really small example, 
which works by calling the function in Python:
   
   ```go
   func readFromDuckDB(streamOut uintptr) {
   
        c, _ := duckdb.NewConnector("", nil)
        defer c.Close()
   
        conn, _ := c.Connect(context.Background())
        defer conn.Close()
   
        // Obtain the Arrow from the connection.
        arrow, _ := duckdb.NewArrowFromConn(conn)
   
        rdr, _ := arrow.QueryContext(context.Background(), "SELECT * FROM 
generate_series(1, 100000)")
   
        defer rdr.Release()
   
        cdata.ExportRecordReader(rdr, 
(*cdata.CArrowArrayStream)(unsafe.Pointer(streamOut)))
   }
   
   ```
   But I'm trying to wrap my head around the `defer rdr.Release()` should Go be 
calling it at this point, or is something to delegate to Python land?


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