Skip to content

Commit

Permalink
Parquet Writer: Make column descriptor getter on GenericColumnWriter (#…
Browse files Browse the repository at this point in the history
…3002)

This is so that it's possible to gather information from the column
we're about to write to. That information was already present in the
column but not publicly available.

The getter returns a reference of `ColumnDescPtr`.

Co-authored-by: Raphael Taylor-Davies <[email protected]>
  • Loading branch information
pier-oliviert and tustvold authored Nov 4, 2022
1 parent 01ea8c7 commit 8ca4e65
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions parquet/src/column/writer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,11 @@ impl<'a, E: ColumnValueEncoder> GenericColumnWriter<'a, E> {
self.column_metrics.total_rows_written
}

/// Returns a reference to a [`ColumnDescPtr`]
pub fn get_descriptor(&self) -> &ColumnDescPtr {
&self.descr
}

/// Finalises writes and closes the column writer.
/// Returns total bytes written, total rows written and column chunk metadata.
pub fn close(mut self) -> Result<ColumnCloseResult> {
Expand Down

0 comments on commit 8ca4e65

Please sign in to comment.