Skip to content
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

Implement StringBuilder::append_option #601

Merged
merged 2 commits into from
Jul 25, 2021

Conversation

mzeitlin11
Copy link
Contributor

Which issue does this PR close?

Closes #263.

Are there any user-facing changes?

Addition of a new method, StringBuilder::append_option (please let me know if this should be added to the CHANGELOG)

@github-actions github-actions bot added the arrow Changes to the arrow crate label Jul 24, 2021
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @mzeitlin11 -- this looks great!

please let me know if this should be added to the CHANGELOG

This will automatically get added to the changelog by our scripts. There is no need to do anything else

cc @tzzed

let mut builder = StringBuilder::new(20);
builder.append_option(Some("hello")).unwrap();
builder.append_option(None::<&str>).unwrap();
builder.append_option(None::<String>).unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

@codecov-commenter
Copy link

Codecov Report

Merging #601 (e370163) into master (87d2840) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #601   +/-   ##
=======================================
  Coverage   82.41%   82.41%           
=======================================
  Files         167      167           
  Lines       46232    46249   +17     
=======================================
+ Hits        38100    38118   +18     
+ Misses       8132     8131    -1     
Impacted Files Coverage Δ
arrow/src/array/builder.rs 86.26% <100.00%> (+0.15%) ⬆️
parquet/src/encodings/encoding.rs 95.04% <0.00%> (+0.19%) ⬆️

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 87d2840...e370163. Read the comment docs.

@alamb alamb merged commit 1d6c374 into apache:master Jul 25, 2021
alamb pushed a commit that referenced this pull request Jul 25, 2021
* Implement StringBuilder::append_option

* Add another null append tesT
@mzeitlin11 mzeitlin11 deleted the string_builder_append_option branch July 25, 2021 12:33
alamb added a commit that referenced this pull request Jul 26, 2021
* Implement StringBuilder::append_option

* Add another null append tesT

Co-authored-by: Matthew Zeitlin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement StringBuilder::append_option
3 participants