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

expose row-group flush in public api #1634

Merged
merged 3 commits into from May 2, 2022

Conversation

Cheappie
Copy link
Contributor

@Cheappie Cheappie commented May 1, 2022

Which issue does this PR close?

Closes #1626

Rationale for this change

more power for the users to let them decide when to flush row group

Are there any user-facing changes?

not much, just one more method with single line body

@github-actions github-actions bot added the parquet Changes to the parquet crate label May 1, 2022
Copy link
Contributor

@tustvold tustvold left a comment

Choose a reason for hiding this comment

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

Some minor nits, otherwise looks good to me. Thank you 👍

parquet/src/arrow/arrow_writer.rs Outdated Show resolved Hide resolved
parquet/src/arrow/arrow_writer.rs Outdated Show resolved Hide resolved
parquet/src/arrow/arrow_writer.rs Outdated Show resolved Hide resolved
parquet/src/arrow/arrow_writer.rs Outdated Show resolved Hide resolved
@@ -192,8 +196,8 @@ impl<W: 'static + ParquetWriter> ArrowWriter<W> {

/// Close and finalize the underlying Parquet writer
pub fn close(&mut self) -> Result<parquet_format::FileMetaData> {
self.flush_completed()?;
self.flush_row_group(self.buffered_rows)?;
self.flush_excess()?;
Copy link
Contributor

Choose a reason for hiding this comment

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

I know this existed before, but I think it is actually redundant as write calls flush_excess

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, It is redundant, I didn't want to remove that on my own because it could be intentional to have defensive approach when closing writer, but right now that seems unnecessary unless more options for write popup in ArrowWriter

@codecov-commenter
Copy link

Codecov Report

Merging #1634 (3e0dc99) into master (7d00e3c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1634   +/-   ##
=======================================
  Coverage   83.02%   83.03%           
=======================================
  Files         193      193           
  Lines       55577    55578    +1     
=======================================
+ Hits        46145    46147    +2     
+ Misses       9432     9431    -1     
Impacted Files Coverage Δ
parquet/src/arrow/arrow_writer.rs 97.66% <100.00%> (+<0.01%) ⬆️
arrow/src/array/transform/mod.rs 86.68% <0.00%> (-0.12%) ⬇️
parquet_derive/src/parquet_field.rs 66.21% <0.00%> (ø)
parquet/src/encodings/encoding.rs 93.56% <0.00%> (+0.18%) ⬆️
arrow/src/datatypes/datatype.rs 66.80% <0.00%> (+0.39%) ⬆️

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 7d00e3c...3e0dc99. Read the comment docs.

@tustvold tustvold merged commit 20cc4aa into apache:master May 2, 2022
@tustvold
Copy link
Contributor

tustvold commented May 2, 2022

Thanks again 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parquet Changes to the parquet crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose ArrowWriter row group flush in public API
3 participants