zeroshade commented on code in PR #14877:
URL: https://github.com/apache/arrow/pull/14877#discussion_r1044682802
##########
go/arrow/cdata/cdata.go:
##########
@@ -613,6 +639,12 @@ func (imp *cimporter) checkNumBuffers(n int64) error {
func (imp *cimporter) importBuffer(bufferID int, sz int64) *memory.Buffer {
// this is not a copy, we're just having a slice which points at the
data
// it's still owned by the C.ArrowArray object and its backing C++
object.
+ if imp.cbuffers[bufferID] == nil {
+ if sz != 0 {
+ panic("invalid buffer")
Review Comment:
sure, had to propagate the error through to the callers since this method
previously didn't return an error. latest commit updates this with the error
instead of panic.
--
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]