From db70c20f0118c889d971ef7cafcf3f2d9e89f106 Mon Sep 17 00:00:00 2001 From: Joel Lubinitsky Date: Tue, 24 Oct 2023 16:34:39 -0400 Subject: [PATCH] Close recordwriter --- go/arrow/flight/flightsql/client.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/go/arrow/flight/flightsql/client.go b/go/arrow/flight/flightsql/client.go index 7cdb57b608aee..e44cc88fe5dbd 100644 --- a/go/arrow/flight/flightsql/client.go +++ b/go/arrow/flight/flightsql/client.go @@ -238,6 +238,8 @@ func (c *Client) ExecuteIngest(ctx context.Context, rdr array.RecordReader, reqO } wr = flight.NewRecordWriter(stream, ipc.WithAllocator(c.Alloc), ipc.WithSchema(rdr.Schema())) + defer wr.Close() + wr.SetFlightDescriptor(desc) for rdr.Next() {