joellubi commented on code in PR #38385: URL: https://github.com/apache/arrow/pull/38385#discussion_r1562953990
########## go/arrow/flight/flightsql/client.go: ########## @@ -243,6 +243,87 @@ func (c *Client) ExecuteSubstraitUpdate(ctx context.Context, plan SubstraitPlan, return updateResult.GetRecordCount(), nil } +// ExecuteIngest is for executing a bulk ingestion and only returns the number of affected rows. +// The provided RecordReader will be retained for the duration of the call, but it is the caller's +// responsibility to release the original reference. +func (c *Client) ExecuteIngest(ctx context.Context, rdr array.RecordReader, reqOptions *ExecuteIngestOpts, opts ...grpc.CallOption) (int64, error) { + var ( + err error + desc *flight.FlightDescriptor + stream pb.FlightService_DoPutClient + wr *flight.Writer + res *pb.PutResult + updateResult pb.DoPutUpdateResult + ) + + // Servers cannot infer defaults for these parameters, so we validate the request to ensure they are set. + if reqOptions.TableDefinitionOptions == nil { Review Comment: Good point. Since we cast to the protobuf command type anyway, I did so a bit earlier to let it take care of nil handling for us. I added a nil test for completeness too. -- 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