Skip to content

Commit e67f17e

Browse files
etseidlalamb
andauthored
Add ParquetMetaDataReader (#6431)
* add ParquetMetaDataReader * clippy * Apply suggestions from code review Co-authored-by: Andrew Lamb <[email protected]> * formatting * add ParquetMetaDataReader to module documentation * document erros returned from `try_parse_sized` * oops * rename methods per review suggestion --------- Co-authored-by: Andrew Lamb <[email protected]>
1 parent a65e14a commit e67f17e

File tree

2 files changed

+973
-3
lines changed

2 files changed

+973
-3
lines changed

parquet/src/file/metadata/mod.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
//! Reading:
4444
//! * Read from bytes to `ParquetMetaData`: [`decode_footer`]
4545
//! and [`decode_metadata`]
46-
//! * Read from an `async` source to `ParquetMetadata`: [`MetadataLoader`]
46+
//! * Read from an `async` source to `ParquetMetaData`: [`MetadataLoader`]
47+
//! * Read from bytes or from an async source to `ParquetMetaData`: [`ParquetMetaDataReader`]
4748
//!
4849
//! [`MetadataLoader`]: https://docs.rs/parquet/latest/parquet/arrow/async_reader/struct.MetadataLoader.html
4950
//! [`decode_footer`]: crate::file::footer::decode_footer
@@ -94,6 +95,7 @@
9495
//! * Same name, different struct
9596
//! ```
9697
mod memory;
98+
pub(crate) mod reader;
9799
mod writer;
98100

99101
use std::ops::Range;
@@ -115,6 +117,7 @@ use crate::schema::types::{
115117
ColumnDescPtr, ColumnDescriptor, ColumnPath, SchemaDescPtr, SchemaDescriptor,
116118
Type as SchemaType,
117119
};
120+
pub use reader::ParquetMetaDataReader;
118121
pub use writer::ParquetMetaDataWriter;
119122
pub(crate) use writer::ThriftMetadataWriter;
120123

@@ -278,13 +281,11 @@ impl ParquetMetaData {
278281
}
279282

280283
/// Override the column index
281-
#[cfg(feature = "arrow")]
282284
pub(crate) fn set_column_index(&mut self, index: Option<ParquetColumnIndex>) {
283285
self.column_index = index;
284286
}
285287

286288
/// Override the offset index
287-
#[cfg(feature = "arrow")]
288289
pub(crate) fn set_offset_index(&mut self, index: Option<ParquetOffsetIndex>) {
289290
self.offset_index = index;
290291
}

0 commit comments

Comments
 (0)