Refactor: extract FooterTail from ParquetMetadataReader#8437
Merged
alamb merged 6 commits intoapache:mainfrom Sep 25, 2025
Merged
Refactor: extract FooterTail from ParquetMetadataReader#8437alamb merged 6 commits intoapache:mainfrom
alamb merged 6 commits intoapache:mainfrom
Conversation
999eb6a to
94a75ae
Compare
94a75ae to
17f9972
Compare
alamb
commented
Sep 24, 2025
| pub fn decode_footer_tail(slice: &[u8; FOOTER_SIZE]) -> Result<FooterTail> { | ||
| let magic = &slice[4..]; |
Contributor
Author
There was a problem hiding this comment.
the code to parse the footer was previously a member function of ParquetMetadataReader, but I need to use it in the ParquetMetadataPushDecoder, so I pulled it into its own function
alamb
commented
Sep 24, 2025
| }; | ||
| #[cfg(feature = "encryption")] | ||
| use crate::thrift::{TCompactSliceInputProtocol, TSerializable}; | ||
| pub use footer_tail::FooterTail; |
Contributor
Author
There was a problem hiding this comment.
the maintains the same public API
etseidl
approved these changes
Sep 24, 2025
Contributor
etseidl
left a comment
There was a problem hiding this comment.
So much code for 8 bytes 😅
LGTM. Shouldn't impact the remodel much. Thanks!
Co-authored-by: Ed Seidl <etseidl@users.noreply.github.com>
Contributor
Author
Well, to be fair, there are also a lot of license and doc lines :) |
mbrobbel
approved these changes
Sep 25, 2025
Co-authored-by: Matthijs Brobbel <m1brobbel@gmail.com>
Co-authored-by: Matthijs Brobbel <m1brobbel@gmail.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
In #8340 I am trying to split the "IO" from the "where is the metadata in the file" from the "decode thrift into Rust structures" logic.
I want to make it as easy as possible to review so I split it into pieces, but you can see #8340 for how it all fits together
What changes are included in this PR?
This PR cleans up the code that handles parsing the 8 byte parquet file footer,
FooterTail, into its own module and construtorAre these changes tested?
yes, by CI
Are there any user-facing changes?
No, this is entirely internal reorganization and I left a
pub use