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

   It's correct for Go to call `defer rdr.Release()` there.
   
   The call to `ExportRecordReader` will also increment the refcount internally 
so that it sticks around until the eventual call to the release callback of the 
populated ArrowArrayStream struct. So the code you've got there looks correct :)
   
   Though, if all you're doing is executing SQL queries in duckdb without 
adding more logic to the Go side, it might make more sense to just use the 
python bindings for ADBC and the Python duckdb package, haha. 
(https://duckdb.org/docs/stable/clients/adbc#python).
   
   One other comment I'd have is that it's pretty inefficient to create a new 
duckdb connection on each call to that function if you plan on it being called 
multiple times. It would be better to produce a connection object, run queries 
against it for results, and then close it (which is how ADBC works.... lol)


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

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

Reply via email to