Skip to content
Prev Previous commit
Next Next commit
Add comment side effect of writing column and offset indexes
  • Loading branch information
alamb committed Aug 8, 2024
commit cc6f9bf5d574e10d49c329adbe71e02f0e7ba68d
12 changes: 10 additions & 2 deletions parquet/src/file/metadata/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ pub(crate) struct ThriftMetadataWriter<'a, W: Write> {
}

impl<'a, W: Write> ThriftMetadataWriter<'a, W> {
/// Serialize all the offset index to the file
/// Serialize all the offset indexes to `self.buf`,
///
/// Note: also updates the `ColumnChunk::offset_index_offset` and
/// `ColumnChunk::offset_index_length`]s to reflect the position and length
/// of the serialized offset indexes.
fn write_offset_indexes(&mut self, offset_indexes: &[Vec<Option<OffsetIndex>>]) -> Result<()> {
// iter row group
// iter each column
Expand All @@ -69,7 +73,11 @@ impl<'a, W: Write> ThriftMetadataWriter<'a, W> {
Ok(())
}

/// Serialize all the column index to the file
/// Serialize all the column indexes to the `self.buf`
///
/// Note: also updates the `ColumnChunk::column_index_offset` and
/// `ColumnChunk::column_index_length` to reflect the position and length
/// of the serialized column indexes.
fn write_column_indexes(&mut self, column_indexes: &[Vec<Option<ColumnIndex>>]) -> Result<()> {
// iter row group
// iter each column
Expand Down