Skip to content

GH-32949: [Go] REE Array IPC read/write - #14223

Merged
zeroshade merged 25 commits into
apache:masterfrom
zeroshade:arrow-17712-rle-ipc
Feb 6, 2023
Merged

zeroshade merged 25 commits into
apache:masterfrom
zeroshade:arrow-17712-rle-ipc

Conversation

@zeroshade

@zeroshade zeroshade commented Sep 23, 2022 •

Copy link
Copy Markdown
Member

@zeroshade

Copy link
Copy Markdown
Member Author

CC @zagto

@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

⚠️ Ticket has not been started in JIRA, please click 'Start Progress'.

@zeroshade
zeroshade force-pushed the arrow-17712-rle-ipc branch 2 times, most recently from d208d59 to fe970bd Compare October 20, 2022 17:42
@zeroshade
zeroshade force-pushed the arrow-17712-rle-ipc branch from 3519414 to 07570da Compare October 21, 2022 16:02
@zeroshade
zeroshade force-pushed the arrow-17712-rle-ipc branch from 3e9f906 to 3be3650 Compare January 30, 2023 17:46
@zeroshade
zeroshade marked this pull request as ready for review January 30, 2023 17:46
@zeroshade zeroshade changed the title ARROW-17712: [Go] RLE Array IPC read/write GH-32949: [Go] RLE Array IPC read/write Jan 30, 2023
@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #32949 has been automatically assigned in GitHub to PR creator.

@zeroshade
zeroshade requested a review from lidavidm January 30, 2023 17:50
@zeroshade zeroshade changed the title GH-32949: [Go] RLE Array IPC read/write GH-32949: [Go] REE Array IPC read/write Jan 30, 2023

@westonpace westonpace left a comment

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why min_value=1?

Copy link
Copy Markdown
Member Author

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.

@zeroshade
zeroshade force-pushed the arrow-17712-rle-ipc branch from 14b953f to b74e667 Compare February 1, 2023 21:38
@zeroshade

Copy link
Copy Markdown
Member Author

I'll merge this EOD if no one has any objections.

Comment thread go/arrow/array/encoded.go
// RunEnds: [ 1, 2, 4, 6, 10, 1000, 1750, 2000 ]
// Values: [ "a", "b", "c", "d", "e", "f", "g", "h" ]
//
// LogicalValuesArray will return the following array:

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Member Author

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it.

Comment thread go/arrow/datatype_encoded.go Resolved
Comment thread go/arrow/encoded/ree_utils.go Resolved

@felipecrv felipecrv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zeroshade
zeroshade merged commit 9b4c972 into apache:master Feb 6, 2023
@ursabot

ursabot commented Feb 7, 2023

Copy link
Copy Markdown

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.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Finished ⬇️0.37% ⬆️0.06%] test-mac-arm
[Finished ⬇️0.26% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.19% ⬆️0.0%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 9b4c9724 ec2-t3-xlarge-us-east-2
[Finished] 9b4c9724 test-mac-arm
[Finished] 9b4c9724 ursa-i9-9960x
[Finished] 9b4c9724 ursa-thinkcentre-m75q
[Finished] 9e7b79b3 ec2-t3-xlarge-us-east-2
[Finished] 9e7b79b3 test-mac-arm
[Finished] 9e7b79b3 ursa-i9-9960x
[Finished] 9e7b79b3 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Go] REE Arrays IPC read/write

6 participants