-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Refactor: extract FooterTail from ParquetMetadataReader #8437
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
Conversation
999eb6a to
94a75ae
Compare
94a75ae to
17f9972
Compare
| pub fn decode_footer_tail(slice: &[u8; FOOTER_SIZE]) -> Result<FooterTail> { | ||
| let magic = &slice[4..]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
| }; | ||
| #[cfg(feature = "encryption")] | ||
| use crate::thrift::{TCompactSliceInputProtocol, TSerializable}; | ||
| pub use footer_tail::FooterTail; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the maintains the same public API
etseidl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So much code for 8 bytes 😅
LGTM. Shouldn't impact the remodel much. Thanks!
Co-authored-by: Ed Seidl <[email protected]>
Well, to be fair, there are also a lot of license and doc lines :) |
mbrobbel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @alamb
Co-authored-by: Matthijs Brobbel <[email protected]>
Co-authored-by: Matthijs Brobbel <[email protected]>
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