jhorstmann commented on code in PR #7984:
URL: https://github.com/apache/arrow-rs/pull/7984#discussion_r2227758149


##########
arrow-array/src/builder/fixed_size_binary_builder.rs:
##########
@@ -89,15 +89,15 @@ impl FixedSizeBinaryBuilder {
     #[inline]
     pub fn append_null(&mut self) {
         self.values_builder
-            .append_slice(&vec![0u8; self.value_length as usize][..]);
+            .extend_from_slice(&vec![0u8; self.value_length as usize][..]);

Review Comment:
   You can avoid the temporary `Vec` now by using 
`values_builder.resize(values_builder.len() + value_length, 0_u8)` or 
`values_builder.extend(std::iter::repeat_n(0_u8, len)`



-- 
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]

Reply via email to