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

Simplify ParquetFileArrowReader Metadata API #1773

Merged
merged 1 commit into from
Jun 1, 2022

Conversation

tustvold
Copy link
Contributor

@tustvold tustvold commented Jun 1, 2022

Which issue does this PR close?

Follow on from #1716

Rationale for this change

As pointed out by @alamb https://github.com/influxdata/influxdb_iox/pull/4743/files/5fccaab1f94f7e5b8b69ab35ea11c151cb1b8a2d#r885642739 the UX of getting the parquet schema from a ParquetFileArrowReader is not great.

What changes are included in this PR?

Adds a parquet_schema member function that returns the schema.

It also deprecates the get_metadata function, as it doesn't need a mutable reference nor to return a clone, and replaces it with a metadata function that is consistent with the equivalent method on FileReader.

Are there any user-facing changes?

A function is deprecated

@github-actions github-actions bot added the parquet Changes to the parquet crate label Jun 1, 2022
@tustvold tustvold changed the title Improve ParquetFileArrowReader UX Simplify ParquetFileArrowReader Metadata API Jun 1, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #1773 (71cfed9) into master (28949f1) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #1773      +/-   ##
==========================================
- Coverage   83.39%   83.39%   -0.01%     
==========================================
  Files         198      198              
  Lines       56138    56142       +4     
==========================================
- Hits        46819    46818       -1     
- Misses       9319     9324       +5     
Impacted Files Coverage Δ
parquet/src/arrow/arrow_reader.rs 96.13% <0.00%> (-0.75%) ⬇️
arrow/src/datatypes/datatype.rs 65.42% <0.00%> (-0.38%) ⬇️

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 28949f1...71cfed9. Read the comment docs.

@@ -164,10 +165,21 @@ impl ParquetFileArrowReader {
}

/// Expose the reader metadata
#[deprecated = "use metadata() instead"]
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 love deprecated -- first step towards keeping the API stable for longer 👍

@alamb
Copy link
Contributor

alamb commented Jun 1, 2022

Thank you @tustvold

@nevi-me nevi-me merged commit c1a91dc into apache:master Jun 1, 2022
@alamb
Copy link
Contributor

alamb commented Jun 1, 2022

🎉

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.

None yet

4 participants