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


##########
go/arrow/flight/record_batch_writer.go:
##########
@@ -47,7 +53,16 @@ func (f *flightPayloadWriter) WritePayload(payload 
ipc.Payload) error {
        payload.SerializeBody(&f.buf)
        f.fd.DataBody = f.buf.Bytes()
 
-       return f.w.Send(&f.fd)
+       err := f.w.Send(&f.fd)
+       if err == io.EOF {
+               // gRPC returns io.EOF if the error was generated by the server.
+               // We return a more informative error to clients that hides 
this gRPC idiosyncrasy.
+               // The error can be retrieved subsequently by calling RecvMsg 
on the stream
+               // ref: https://pkg.go.dev/google.golang.org/grpc#ClientStream
+               return ErrDataStreamClosed
+       }

Review Comment:
   This is a breaking change/do we necessarily want to deviate from gRPC here?



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

Reply via email to