joellubi commented on code in PR #40284:
URL: https://github.com/apache/arrow/pull/40284#discussion_r1508393306


##########
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 did come across a slight issue where the function signature of 
`CancelFlightInfo` probably wasn't what it should've been. It was copying the 
return value rather than returning a pointer. I fixed this to align with the 
other handlers as well as anywhere I tracked down usage.



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