Skip to content

ARROW-11040: [Rust] Simplified builders - #9019

Closed
jorgecarleitao wants to merge 3 commits into
apache:masterfrom
jorgecarleitao:generic_list
Closed

ARROW-11040: [Rust] Simplified builders#9019
jorgecarleitao wants to merge 3 commits into
apache:masterfrom
jorgecarleitao:generic_list

Conversation

@jorgecarleitao

@jorgecarleitaojorgecarleitao commented Dec 26, 2020

Copy link
Copy Markdown
Member

This PR simplifies the builders code. It has no semantic, execution or API change.

The main idea here is to generalize [Large]ListBuilder, [Large]StringBuilder, [Large]BinaryBuilder as GenericListBuilder, GenericStringBuilder and GenericBinaryBuilder respectively, thereby removing duplicated code.

The relevant changes in this PR are on src/array/builders.rs only.

@github-actions

Copy link
Copy Markdown

@codecov-io

codecov-io commented Dec 26, 2020

Copy link
Copy Markdown

Codecov Report

Merging #9019 (12a5b20) into master (cd22be6) will increase coverage by 0.05%.
The diff coverage is 95.65%.

Impacted file tree graph

@@ Coverage Diff @@## master #9019 +/- ##
==========================================
+ Coverage 82.55% 82.61% +0.05% 
==========================================
Files 203 203 Lines 50043 49942 -101 ==========================================
- Hits 41315 41259 -56 + Misses 8728 8683 -45 
Impacted FilesCoverage Δ
rust/arrow/src/array/array_list.rs93.10% <ø> (ø)
rust/arrow/src/array/builder.rs85.89% <93.10%> (+1.89%)⬆️
rust/arrow/src/array/array_binary.rs90.54% <100.00%> (-0.07%)⬇️
rust/arrow/src/array/array_string.rs90.16% <100.00%> (-0.11%)⬇️
rust/arrow/src/array/transform/list.rs83.87% <100.00%> (ø)
rust/arrow/src/array/transform/utils.rs100.00% <100.00%> (ø)
rust/arrow/src/array/transform/variable_size.rs100.00% <100.00%> (ø)
rust/arrow/src/compute/kernels/substring.rs98.29% <100.00%> (ø)
rust/arrow/src/compute/util.rs98.93% <100.00%> (ø)
rust/arrow/src/json/reader.rs81.47% <100.00%> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cd22be6...12a5b20. Read the comment docs.

@jorgecarleitao
jorgecarleitao marked this pull request as ready for review December 28, 2020 17:29

@waynexiawaynexia 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.

Nice simplification, I think this is also a good example of how to play with different offset types in a single place 👍

@nevi-me
nevi-me self-requested a review December 29, 2020 07:31

@nevi-menevi-me 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.

Thanks @jorgecarleitao for the simplification

Comment threadrust/arrow/src/array/builder.rs Outdated

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.

I just noticed that we had named this unintuitively, as we're counting the set bits

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

unset? it proves the point, though 🤣

FYI, @nevi-me , the tests are not running (INFRA team deactivated most actions), so we need to be careful with merging to master. There is a thread in the mailing list about it.

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.

Okay, thanks for the heads-up. I'll check my emails

@alamb

Copy link
Copy Markdown
Contributor

The full set of Rust CI tests did not run on this PR :(

Can you please rebase this PR against apache/master to pick up the changes in #9056 so that they do?

I apologize for the inconvenience.

Sign up for freeto 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.

5 participants

@jorgecarleitao@codecov-io@alamb@nevi-me@waynexia