This is an automated email from the ASF dual-hosted git repository.

tustvold pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/master by this push:
     new 8ca4e65a7 Parquet Writer: Make column descriptor getter on 
GenericColumnWriter (#3002)
8ca4e65a7 is described below

commit 8ca4e65a7311e694e5d314aead7c970e75fbf270
Author: Pier-Olivier Thibault <[email protected]>
AuthorDate: Thu Nov 3 22:08:42 2022 -0400

    Parquet Writer: Make column descriptor getter on GenericColumnWriter (#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]>
---
 parquet/src/column/writer/mod.rs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/parquet/src/column/writer/mod.rs b/parquet/src/column/writer/mod.rs
index f9b429f5b..7415d9aad 100644
--- a/parquet/src/column/writer/mod.rs
+++ b/parquet/src/column/writer/mod.rs
@@ -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> {

Reply via email to