You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "etseidl (via GitHub)" <gi...@apache.org> on 2025/09/10 22:18:27 UTC
[PR] [thrift-remodel] Begin replacing file metadata reader and convert footer decryption code [arrow-rs]
etseidl opened a new pull request, #8313:
URL: https://github.com/apache/arrow-rs/pull/8313
# Which issue does this PR close?
**Note: this targets a feature branch, not main**
- Part of #5854.
# Rationale for this change
Continuing the remodel
# What changes are included in this PR?
This begins the process of replacing the current footer parsing code with the new version. As part of this much of the decryption machinery also needed to be changed.
# Are these changes tested?
Should be covered by existing tests
# Are there any user-facing changes?
Yes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [thrift-remodel] Begin replacing file metadata reader and convert footer decryption code [arrow-rs]
Posted by "etseidl (via GitHub)" <gi...@apache.org>.
etseidl merged PR #8313:
URL: https://github.com/apache/arrow-rs/pull/8313
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [thrift-remodel] Begin replacing file metadata reader and convert footer decryption code [arrow-rs]
Posted by "etseidl (via GitHub)" <gi...@apache.org>.
etseidl commented on code in PR #8313:
URL: https://github.com/apache/arrow-rs/pull/8313#discussion_r2338068501
##########
parquet/src/file/metadata/reader.rs:
##########
@@ -960,101 +947,11 @@ impl ParquetMetaDataReader {
encrypted_footer: bool,
file_decryption_properties: Option<&FileDecryptionProperties>,
) -> Result<ParquetMetaData> {
- let mut prot = TCompactSliceInputProtocol::new(buf);
Review Comment:
much of this deleted code wound up in thrift_gen.rs
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [thrift-remodel] Begin replacing file metadata reader and convert footer decryption code [arrow-rs]
Posted by "etseidl (via GitHub)" <gi...@apache.org>.
etseidl commented on PR #8313:
URL: https://github.com/apache/arrow-rs/pull/8313#issuecomment-3286768936
Thanks for the review @alamb! On to the next one 😄
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [thrift-remodel] Begin replacing file metadata reader and convert footer decryption code [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #8313:
URL: https://github.com/apache/arrow-rs/pull/8313#discussion_r2345281913
##########
parquet/src/file/metadata/reader.rs:
##########
@@ -1065,116 +962,17 @@ impl ParquetMetaDataReader {
///
/// [Parquet Spec]: https://github.com/apache/parquet-format#metadata
pub fn decode_metadata(buf: &[u8]) -> Result<ParquetMetaData> {
- let mut prot = TCompactSliceInputProtocol::new(buf);
-
- let t_file_metadata = crate::format::FileMetaData::read_from_in_protocol(&mut prot)
- .map_err(|e| general_err!("Could not parse metadata: {}", e))?;
- let schema = types::from_thrift(&t_file_metadata.schema)?;
- let schema_descr = Arc::new(SchemaDescriptor::new(schema));
-
- let mut row_groups = Vec::new();
- for rg in t_file_metadata.row_groups {
- row_groups.push(RowGroupMetaData::from_thrift(schema_descr.clone(), rg)?);
- }
- let column_orders =
- Self::parse_column_orders(t_file_metadata.column_orders, &schema_descr)?;
-
- let key_value_metadata = t_file_metadata.key_value_metadata.map(|vkv| {
- vkv.into_iter()
- .map(|kv| KeyValue::new(kv.key, kv.value))
- .collect::<Vec<KeyValue>>()
- });
-
- let file_metadata = FileMetaData::new(
- t_file_metadata.version,
- t_file_metadata.num_rows,
- t_file_metadata.created_by,
- key_value_metadata,
- schema_descr,
- column_orders,
- );
-
- Ok(ParquetMetaData::new(file_metadata, row_groups))
- }
-
- /// create meta data from thrift encoded bytes
- pub fn decode_file_metadata(buf: &[u8]) -> Result<ParquetMetaData> {
let mut prot = ThriftCompactInputProtocol::new(buf);
Review Comment:

##########
parquet/src/file/metadata/reader.rs:
##########
@@ -960,101 +947,11 @@ impl ParquetMetaDataReader {
encrypted_footer: bool,
file_decryption_properties: Option<&FileDecryptionProperties>,
) -> Result<ParquetMetaData> {
- let mut prot = TCompactSliceInputProtocol::new(buf);
Review Comment:
FYI I am messing with this code as part of https://github.com/apache/arrow-rs/pull/8340 (mostly I moved where it lives) -- that isn't a problem per se, I am just giving you a heads up so we can coordinate what to merge when in what order, etc
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [thrift-remodel] Begin replacing file metadata reader and convert footer decryption code [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #8313:
URL: https://github.com/apache/arrow-rs/pull/8313#issuecomment-3282003613
Thanks @etseidl -- I hope to review this PR later today or tomorrow
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org