-
Notifications
You must be signed in to change notification settings - Fork 787
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
Add a function to get memory size of array slice #3501
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is worth noting that this may overestimate for sliced ListArray and StructArray, but I'm not sure if we are being smart when writing those yet. Either way I think this is a good start
@viirya may know??
For I'm not sure if there is an issue on |
The way we propagate the offsets into children is not guaranteed, and is actually an incorrect special case I wish to remove, but yes ignoring this edge case, the logic here is fine. As for lists, theoretically the IPC writer could find the min offset in the list slice, and then shift everything down - as is done for StringArray, etc... Not sure if we do this yet... |
Benchmark runs are scheduled for baseline = b4abb75 and contender = a8276c0. a8276c0 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Oh, I see. I remember I did something on buffer slice in IPC writer. I may need to re-look it to see if we do it for list slice. |
Wow -- thank you @askoa . This is great |
Which issue does this PR close?
Closes #3407
Rationale for this change
See issue description.
What changes are included in this PR?
Function to calculate buffer size of array slice.
Are there any user-facing changes?
User will get a new API that'll calculate the buffer size of array slice.