zeroshade commented on code in PR #4267:
URL: https://github.com/apache/arrow-adbc/pull/4267#discussion_r3139539233


##########
go/adbc/adbc.go:
##########
@@ -737,19 +737,23 @@ type Statement interface {
        // executed repeatedly, Prepare should be called first on the statement.
        SetSubstraitPlan(plan []byte) error
 
-       // Bind uses an arrow record batch to bind parameters to the query.
+       // Bind uses an Arrow record batch to bind parameters to the query.
        //
-       // This can be used for bulk inserts or for prepared statements.
-       // The driver will call release on the passed in Record when it is done,
-       // but it may not do this until the statement is closed or another
-       // record is bound.
+       // This can be used for bulk inserts or for prepared statements.  The
+       // driver will take ownership of (Retain) the given batch; the
+       // application may Release the batch after binding. The driver will
+       // Release the batch after processing, but this may not be until Close
+       // is called. A nil batch will unbind values.
        Bind(ctx context.Context, values arrow.RecordBatch) error
 
        // BindStream uses a record batch stream to bind parameters for this
        // query. This can be used for bulk inserts or prepared statements.
        //
-       // The driver will call Release on the record reader, but may not do 
this
-       // until Close is called.
+       // This can be used for bulk inserts or for prepared statements.  The
+       // driver will take ownership of (Retain) the given reader; the
+       // application may Release the reader after binding. The driver will

Review Comment:
   same as above, the application *must* call Release



##########
go/adbc/adbc.go:
##########
@@ -737,19 +737,23 @@ type Statement interface {
        // executed repeatedly, Prepare should be called first on the statement.
        SetSubstraitPlan(plan []byte) error
 
-       // Bind uses an arrow record batch to bind parameters to the query.
+       // Bind uses an Arrow record batch to bind parameters to the query.
        //
-       // This can be used for bulk inserts or for prepared statements.
-       // The driver will call release on the passed in Record when it is done,
-       // but it may not do this until the statement is closed or another
-       // record is bound.
+       // This can be used for bulk inserts or for prepared statements.  The
+       // driver will take ownership of (Retain) the given batch; the
+       // application may Release the batch after binding. The driver will

Review Comment:
   because the driver calls Retain it is the application's responsibility that 
they *have* to call Release separately otherwise it'll be leaked (as opposed to 
"may")



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