lidavidm commented on code in PR #4659:
URL: https://github.com/apache/arrow-adbc/pull/4659#discussion_r3826510870


##########
go/adbc/driver/flightsql/flightsql_connection.go:
##########
@@ -1344,65 +1345,79 @@ func (c *connectionImpl) prepareSubstrait(ctx 
context.Context, plan flightsql.Su
 }
 
 // Close closes this connection and releases any associated resources.
-func (c *connectionImpl) Close() error {
+func (c *connectionImpl) Close() (err error) {
+       const spanName = "FlightSQL.Connection.Close"
+       startTime := time.Now()
+       ctx, span := internal.StartSpan(context.Background(), spanName, c)
+       defer func() {
+               internal.NewEndSpanHelper(span).
+                       WithError(err).
+                       WithStartTime(startTime).
+                       EndSpan()
+       }()
+
        if c.cl == nil {
-               return adbc.Error{
+               err = adbc.Error{
                        Msg:  "[Flight SQL Connection] trying to close already 
closed connection",
                        Code: adbc.StatusInvalidState,
                }
+               return err
        }

Review Comment:
   There's lots more instances of this in this PR that could be reverted.



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