mbrobbel commented on code in PR #8436:
URL: https://github.com/apache/arrow-rs/pull/8436#discussion_r2377990727
##########
parquet/src/file/metadata/reader.rs:
##########
@@ -15,46 +15,43 @@
// specific language governing permissions and limitations
// under the License.
-use std::{io::Read, ops::Range, sync::Arc};
+use std::{io::Read, ops::Range};
-use crate::basic::ColumnOrder;
#[cfg(feature = "encryption")]
-use crate::encryption::{
- decrypt::{FileDecryptionProperties, FileDecryptor},
- modules::create_footer_aad,
-};
-use bytes::Bytes;
-
+use crate::encryption::decrypt::FileDecryptionProperties;
use crate::errors::{ParquetError, Result};
-use crate::file::metadata::{ColumnChunkMetaData, FileMetaData,
ParquetMetaData, RowGroupMetaData};
-use crate::file::page_index::index::Index;
-use crate::file::page_index::index_reader::{acc_range, decode_column_index,
decode_offset_index};
+use crate::file::metadata::ParquetMetaData;
+use crate::file::page_index::index_reader::acc_range;
use crate::file::reader::ChunkReader;
use crate::file::{FOOTER_SIZE, PARQUET_MAGIC, PARQUET_MAGIC_ENCR_FOOTER};
-use crate::format::{ColumnOrder as TColumnOrder, FileMetaData as
TFileMetaData};
-#[cfg(feature = "encryption")]
-use crate::format::{EncryptionAlgorithm, FileCryptoMetaData as
TFileCryptoMetaData};
-use crate::schema::types;
-use crate::schema::types::SchemaDescriptor;
-use crate::thrift::{TCompactSliceInputProtocol, TSerializable};
#[cfg(all(feature = "async", feature = "arrow"))]
use crate::arrow::async_reader::{MetadataFetch, MetadataSuffixFetch};
#[cfg(feature = "encryption")]
-use crate::encryption::decrypt::CryptoContext;
-use crate::file::page_index::offset_index::OffsetIndexMetaData;
+use crate::file::metadata::parser::decode_metadata_with_encryption;
+use crate::file::metadata::parser::{decode_metadata, parse_column_index,
parse_offset_index};
-/// Reads the [`ParquetMetaData`] from a byte stream.
+/// Reads [`ParquetMetaData`] from a byte stream, with either synchronous or
+/// asynchronous I/O.
+///
+/// There are two flavors of APIs:
+/// * Synchronous: [`Self::try_parse()`], [`Self::try_parse_sized()`],
[`Self::parse_and_finish()`], etc.
+/// * Asynchronous (requires `async` and `arrow` features):
[`Self::try_load()`], etc
+///
+/// See the [`ParquetMetaDataPushDecoder`] for more an API that does not
require I/O.
Review Comment:
```suggestion
/// See the [`ParquetMetaDataPushDecoder`] for an API that does not require
I/O.
```
--
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]