You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "zeroshade (via GitHub)" <gi...@apache.org> on 2023/01/23 21:51:32 UTC

[GitHub] [arrow] zeroshade commented on a diff in pull request #33841: GH-33840: [Go] Improve SQLite Flight SQL Example and provide mainprog

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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org