You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
But this is incorrect because then a slice with length 1 returns an OffsetsBuffer with only one value in the buffer.
I'd argue that either the documentation could be better that this is slicing the raw buffer and not the offsets that a slice of values of that length would have. Or the code could add the +1 itself.
The text was updated successfully, but these errors were encountered:
I found it confusing because at least in a couple places, the API does do semantic handling instead of raw buffer operations. E.g. with_capacity reserves space for n + 1 elements, so the input number refers to the number of values, not the number of offsets.
In any case, it's probably too disruptive to change the API now, so a docstring improvement would probably be best
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The implementations of
slice
onOffsetsBuffer
callsslice
on the underlyingBuffer
directly:arrow2/src/offset.rs
Lines 443 to 459 in 2ecd3e8
But this is incorrect because then a slice with length 1 returns an
OffsetsBuffer
with only one value in the buffer.I'd argue that either the documentation could be better that this is slicing the raw buffer and not the offsets that a slice of values of that length would have. Or the code could add the
+1
itself.The text was updated successfully, but these errors were encountered: