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

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


The following commit(s) were added to refs/heads/main by this push:
     new 2273cdc3e1 [PARQUET] Improve memory efficency for compressed writer 
parquet 1.0 (#8527)
2273cdc3e1 is described below

commit 2273cdc3e16e24f2379b3c96232667cb58881058
Author: Lilian Maurel <[email protected]>
AuthorDate: Tue Oct 7 20:29:06 2025 +0200

    [PARQUET] Improve memory efficency for compressed writer parquet 1.0 (#8527)
    
    # Which issue does this PR close?
    
    
    - Closes #8526 .
    
    # Rationale for this change
    
    
    # What changes are included in this PR?
    
    Memory improvement for page v1 with data compression
    
    # Are these changes tested?
    
    N/A already tested
    
    # Are there any user-facing changes?
    
    No
    
    Co-authored-by: Andrew Lamb <[email protected]>
---
 parquet/src/column/writer/mod.rs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/parquet/src/column/writer/mod.rs b/parquet/src/column/writer/mod.rs
index 9eb5fb3b71..70d02ae03f 100644
--- a/parquet/src/column/writer/mod.rs
+++ b/parquet/src/column/writer/mod.rs
@@ -1073,6 +1073,7 @@ impl<'a, E: ColumnValueEncoder> GenericColumnWriter<'a, 
E> {
                 if let Some(ref mut cmpr) = self.compressor {
                     let mut compressed_buf = 
Vec::with_capacity(uncompressed_size);
                     cmpr.compress(&buffer[..], &mut compressed_buf)?;
+                    compressed_buf.shrink_to_fit();
                     buffer = compressed_buf;
                 }
 

Reply via email to