davidhcoe commented on code in PR #4322:
URL: https://github.com/apache/arrow-adbc/pull/4322#discussion_r3271063814
##########
go/adbc/driver/flightsql/record_reader.go:
##########
@@ -174,6 +269,31 @@ func newRecordReader(ctx context.Context, alloc
memory.Allocator, cl *flightsql.
return reader, nil
}
+// estimateBatchBytes returns a rough estimate of the in-memory size of a
+// record batch. The estimate is intentionally cheap to compute and is only
+// used for diagnostic logging so it does not have to be exact; it simply sums
+// the lengths of every column buffer in the batch. The total is useful for
+// answering questions such as "did the stream fail after receiving 10 KB or
+// 10 MB?" when triaging a mid-stream EOF.
+func estimateBatchBytes(rec arrow.RecordBatch) int64 {
Review Comment:
Switched to util.TotalRecordSize. Removed the local estimateBatchBytes
helper.
--
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]