-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Go] *array.Binary.ValueOffset doesn't work correctly #41
Comments
|
@zeroshade I am talking about inconsistency between binary and string. I had a loop over binary and string arrays of the same length, and it raised panic for binary. However, when I debugged, I could see the element at the requested index, so the if-statement was not wrong. I think the logic for strings is correct, because as I said the element existed in the array but could not be accessed due to panic. |
Semantically, the logic in for the Binary array is correct, not the String one. You should never be calling If you need that value you could iterate through the slice provided by calling |
Describe the bug, including details regarding any error messages, version, and platform.
https://github.com/apache/arrow/blob/main/go/arrow/array/binary.go#L76 -- this place is incorrect. For example, valueOffsets contain 6 offsets for the array with 5 elements, but calling array.ValueOffset(5) will cause the panic although the element exists.
It must be
similar to strings https://github.com/apache/arrow/blob/main/go/arrow/array/string.go#L66.
Component(s)
Go
The text was updated successfully, but these errors were encountered: