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


##########
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:
   Updated



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