anoopj opened a new issue, #3079:
URL: https://github.com/apache/iceberg-rust/issues/3079

   ### Is your feature request related to a problem or challenge?
   
   While reading a table that projects _partition (with a string field), I 
noticed create_primitive_array_repeated in arrow/value.rs builds the column 
like this:
   
   `StringArray::from(vec![value.clone(); num_rows])`
   
   That `vec![value.clone(); num_rows]` clones the string into num_rows 
separate heap allocations per batch, just to throw the Vec away once the Arrow 
array is built. The `Binary/LargeBinary/FixedSizeBinary` arms have the same 
shape (a throwaway intermediate `Vec`).
   
   
   ### Describe the solution you'd like
   
   We can stream the single value straight into the Arrow buffer instead:
   
   `StringArray::from_iter_values(std::iter::repeat_n(value.as_str(), 
num_rows))`
   
   It's the same idea as the positional-delete fix in #3015
   
   ### Willingness to contribute
   
   I can contribute to this feature independently


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to