Skip to content

Commit 9eb41d3

Browse files
XiangpengHaoalamb
andauthored
Update arrow-row/src/variable.rs
Co-authored-by: Andrew Lamb <[email protected]>
1 parent 6451fe0 commit 9eb41d3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arrow-row/src/variable.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,9 @@ fn decode_binary_view_inner(
260260
});
261261

262262
let values_capacity: usize = rows.iter().map(|row| decoded_len(row, options)).sum();
263+
// Reserve the max amount of bytes possible for this buffer.
264+
// However, only strings longer than 12 bytes are copied here
265+
// This means it is less memory efficient but faster to do utf8 validation
263266
let mut values = MutableBuffer::new(values_capacity);
264267
let mut views = BufferBuilder::<u128>::new(len);
265268

0 commit comments

Comments
 (0)