Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
lidavidm committed Jul 10, 2024
1 parent d07fa47 commit 4702b5b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion go/adbc/driver/flightsql/flightsql_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,13 @@ func (c *connectionImpl) getSessionOptions(ctx context.Context) (map[string]inte

func (c *connectionImpl) setSessionOptions(ctx context.Context, key string, val interface{}) error {
req := flight.SetSessionOptionsRequest{}
ctx = metadata.NewOutgoingContext(ctx, c.hdrs)
hdrs := make([]string, c.hdrs.Len()*2)
for k, vv := range c.hdrs {
for _, v := range vv {
hdrs = append(hdrs, k, v)
}
}
ctx = metadata.AppendToOutgoingContext(ctx, hdrs...)

var err error
req.SessionOptions, err = flight.NewSessionOptionValues(map[string]any{key: val})
Expand Down

0 comments on commit 4702b5b

Please sign in to comment.