-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
GH-32949: [Go] REE Array IPC read/write #14223
Conversation
zeroshade
commented
Sep 23, 2022
•
edited by github-actions
bot
Loading
edited by github-actions
bot
- Closes: [Go] REE Arrays IPC read/write #32949
CC @zagto |
|
d208d59
to
fe970bd
Compare
3519414
to
07570da
Compare
3e9f906
to
3be3650
Compare
|
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.
A few questions, mostly probably from my lack of knowledge around the integration tests.
def __init__(self, name, bit_width, *, nullable=False, | ||
metadata=None): | ||
super().__init__(name, is_signed=True, bit_width=bit_width, | ||
nullable=nullable, metadata=metadata, min_value=1) |
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.
Why min_value=1
?
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.
As i mentioned in my comment about starting on a non-zero value, it's technically meaningless and incorrect to start on a 0 value for run-ends, the min-value should be 1 since run-ends are always 1 past the last index. Run-ends should never start on a 0.
Co-authored-by: Weston Pace <weston.pace@gmail.com>
Co-authored-by: zagto <tobias@zagorni.eu>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
14b953f
to
b74e667
Compare
I'll merge this EOD if no one has any objections. |
// RunEnds: [ 1, 2, 4, 6, 10, 1000, 1750, 2000 ] | ||
// Values: [ "a", "b", "c", "d", "e", "f", "g", "h" ] | ||
// | ||
// LogicalValuesArray will return the following array: |
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.
The C++ implementation has an iterator class that allows a zero-copy iteration over the runs that match the logical (offset, length)
slice. Do you have a similar thing in Go or is this function used instead?
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.
This function is used for producing the slice that is used for writing the IPC data. It's a zero-copy slice.
In encoded.go
there's MergedRuns
which provides a similar function to your iterator class which provides zero-copy iteration of runs using offset/length (and for finding common runs between two REE arrays). The only a time a copy happens is when calling LogicalRunEndsArray
when the offset is non-zero because it needs to modify the actual run-end values to be zero-adjusted.
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.
Got it.
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.
LGTM
Benchmark runs are scheduled for baseline = 9e7b79b and contender = 9b4c972. 9b4c972 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
* Closes: apache#32949 Lead-authored-by: Matt Topol <zotthewizard@gmail.com> Co-authored-by: zagto <tobias@zagorni.eu> Co-authored-by: Antoine Pitrou <pitrou@free.fr> Co-authored-by: Weston Pace <weston.pace@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>
* Closes: apache#32949 Lead-authored-by: Matt Topol <zotthewizard@gmail.com> Co-authored-by: zagto <tobias@zagorni.eu> Co-authored-by: Antoine Pitrou <pitrou@free.fr> Co-authored-by: Weston Pace <weston.pace@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>
* Closes: apache#32949 Lead-authored-by: Matt Topol <zotthewizard@gmail.com> Co-authored-by: zagto <tobias@zagorni.eu> Co-authored-by: Antoine Pitrou <pitrou@free.fr> Co-authored-by: Weston Pace <weston.pace@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>