zeroshade commented on code in PR #13770:
URL: https://github.com/apache/arrow/pull/13770#discussion_r935816137
##########
go/arrow/cdata/cdata.go:
##########
@@ -513,14 +551,13 @@ func (imp *cimporter) importFixedSizeBuffer(bufferID int,
byteWidth int64) *memo
return imp.importBuffer(bufferID, bufsize)
}
-func (imp *cimporter) importOffsetsBuffer(bufferID int) *memory.Buffer {
- const offsetsize = int64(arrow.Int32SizeBytes) // go doesn't implement
int64 offsets yet
+func (imp *cimporter) importOffsetsBuffer(bufferID int, offsetsize int64)
*memory.Buffer {
bufsize := offsetsize * int64((imp.arr.length + imp.arr.offset + 1))
return imp.importBuffer(bufferID, bufsize)
}
-func (imp *cimporter) importVariableValuesBuffer(bufferID int, byteWidth int,
offsets []int32) *memory.Buffer {
- bufsize := byteWidth * int(offsets[imp.arr.length])
+func (imp *cimporter) importVariableValuesBuffer(bufferID int, byteWidth int,
bytelen int) *memory.Buffer {
+ bufsize := byteWidth * bytelen
Review Comment:
fair point, i'll fix that
--
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]