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


##########
go/arrow/flight/record_batch_reader.go:
##########
@@ -234,3 +234,30 @@ func StreamChunksFromReader(rdr array.RecordReader, ch 
chan<- StreamChunk) {
                }
        }
 }
+
+func ConcatenateReaders(rdrs []array.RecordReader, ch chan<- StreamChunk) {
+       defer close(ch)
+       defer func() {
+               for _, r := range rdrs {
+                       r.Release()
+               }
+
+               if err := recover(); err != nil {
+                       ch <- StreamChunk{Err: fmt.Errorf("panic while reading: 
%s", err)}

Review Comment:
   it shouldn't be, but it is possible so i'm protecting against other server 
writers throwing panics in their implementation by catching it and returning an 
error instead of bringing down the server.



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