etseidl commented on code in PR #10420:
URL: https://github.com/apache/arrow-rs/pull/10420#discussion_r3896964498


##########
parquet/src/file/metadata/mod.rs:
##########
@@ -49,6 +49,47 @@
 //! Please see [`external_metadata.rs`]
 //!
 //! [`external_metadata.rs`]: 
https://github.com/apache/arrow-rs/tree/master/parquet/examples/external_metadata.rs
+//!
+//! # Metadata Encodings and Structures
+//!
+//! There are three different encodings of Parquet Metadata in this crate:
+//!
+//! 1. `bytes`:encoded with the Thrift `TCompactProtocol` as defined in
+//!    [parquet.thrift]
+//!
+//! 2. [`format`]: Rust structures automatically generated by the thrift 
compiler
+//!    from [parquet.thrift]. These structures are low level and mirror
+//!    the thrift definitions.
+//!
+//! 3. [`file::metadata`] (this module): Easier to use Rust structures
+//!    with a more idiomatic API. Note that, confusingly, some but not all
+//!    of these structures have the same name as the [`format`] structures.
+//!
+//! [`file::metadata`]: crate::file::metadata
+//! [parquet.thrift]:  
https://github.com/apache/parquet-format/blob/master/src/main/thrift/parquet.thrift
+//!
+//! Graphically, this is how the different structures relate to each other:
+//!
+//! ```text
+//!                          ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─         ┌ ─ ─ ─ ─ ─ ─ ─ ─ 
─ ─ ─ ─ ─
+//!                            ┌──────────────┐     │         
┌───────────────────────┐ │
+//!                          │ │ ColumnIndex  │              ││    
ParquetMetaData    │
+//!                            └──────────────┘     │         
└───────────────────────┘ │
+//! ┌──────────────┐         │ ┌────────────────┐            
│┌───────────────────────┐
+//! │   ..0x24..   │ ◀────▶    │  OffsetIndex   │   │ ◀────▶  │    
ParquetMetaData    │ │
+//! └──────────────┘         │ └────────────────┘            
│└───────────────────────┘
+//!                                     ...         │                   ...    
         │
+//!                          │ ┌──────────────────┐          │ 
┌──────────────────┐
+//! bytes                      │  FileMetaData*   │ │          │  
FileMetaData*   │     │
+//! (thrift encoded)         │ └──────────────────┘          │ 
└──────────────────┘
+//!                           ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘         ─ ─ ─ ─ ─ ─ ─ ─ 
─ ─ ─ ─ ─ ┘
+//!
+//!                          format::meta structures          file::metadata 
structures
+//!
+//!                         * Same name, different struct
+//! ```

Review Comment:
   ```suggestion
   ```
   
   This was recently removed from the docs (see #10796).



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to