Describe the bug, including details regarding any error messages, version, and platform.
As detailed in #37976 (comment), we are using ValueOffset64 method of binary-like variable width types (string, binary) to calculate the offset differences and determine all individual value byte widths.
For an Arrow Record of e.g. 10 rows with an array.Binary field, a panic will occur on ValueOffset(10) (last index, matching the data slice length):
|
if i < 0 || i >= a.array.data.length { |
|
panic("arrow/array: index out of range") |
|
} |
This seems to be due to use of >= instead of >. Apparently the same applies for array.LargeBinary fields.
For comparison, array.String fields do not panic when the index input matches the data length:
|
if i < 0 || i > a.array.data.length { |
|
panic("arrow/array: index out of range") |
|
} |
Component(s)
Go
Describe the bug, including details regarding any error messages, version, and platform.
As detailed in #37976 (comment), we are using ValueOffset64 method of binary-like variable width types (string, binary) to calculate the offset differences and determine all individual value byte widths.
For an Arrow Record of e.g. 10 rows with an
array.Binaryfield, a panic will occur onValueOffset(10)(last index, matching the data slice length):arrow/go/arrow/array/binary.go
Lines 76 to 78 in f0c8229
This seems to be due to use of
>=instead of>. Apparently the same applies forarray.LargeBinaryfields.For comparison,
array.Stringfields do not panic when the index input matches the data length:arrow/go/arrow/array/string.go
Lines 66 to 68 in f0c8229
Component(s)
Go