joellubi commented on code in PR #40284:
URL: https://github.com/apache/arrow/pull/40284#discussion_r1508390624
##########
go/arrow/flight/client.go:
##########
@@ -421,3 +424,87 @@ func (c *client) RenewFlightEndpoint(ctx context.Context,
request *RenewFlightEn
}
return &renewedEndpoint, nil
}
+
+func (c *client) SetSessionOptions(ctx context.Context, request
*SetSessionOptionsRequest, opts ...grpc.CallOption) (*SetSessionOptionsResult,
error) {
+ var err error
+ var action flight.Action
+ action.Type = SetSessionOptionsActionType
+ action.Body, err = proto.Marshal(request)
+ if err != nil {
+ return nil, err
+ }
+ stream, err := c.DoAction(ctx, &action, opts...)
+ if err != nil {
+ return nil, err
+ }
+ res, err := stream.Recv()
+ if err != nil {
+ return nil, err
+ }
+ var result SetSessionOptionsResult
+ err = proto.Unmarshal(res.Body, &result)
+ if err != nil {
+ return nil, err
+ }
+ err = ReadUntilEOF(stream)
+ if err != nil {
+ return nil, err
+ }
+ return &result, nil
+}
+
+func (c *client) GetSessionOptions(ctx context.Context, request
*GetSessionOptionsRequest, opts ...grpc.CallOption) (*GetSessionOptionsResult,
error) {
+ var err error
+ var action flight.Action
+ action.Type = GetSessionOptionsActionType
+ action.Body, err = proto.Marshal(request)
+ if err != nil {
+ return nil, err
+ }
+ stream, err := c.DoAction(ctx, &action, opts...)
+ if err != nil {
+ return nil, err
+ }
+ res, err := stream.Recv()
+ if err != nil {
+ return nil, err
+ }
+ var result GetSessionOptionsResult
+ err = proto.Unmarshal(res.Body, &result)
+ if err != nil {
+ return nil, err
+ }
+ err = ReadUntilEOF(stream)
+ if err != nil {
+ return nil, err
+ }
Review Comment:
I was thinking the same as I was going through this. I went back and took a
stab at it, let me know what you think.
--
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]