zeroshade commented on code in PR #38385:
URL: https://github.com/apache/arrow/pull/38385#discussion_r1561584547


##########
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:
   should we validate that `reqOptions` is not `nil` first to avoid a potential 
panic?



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