Skip to content

Commit

Permalink
Update arrow-row/src/variable.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Lamb <[email protected]>
  • Loading branch information
XiangpengHao and alamb authored Jul 13, 2024
1 parent 6451fe0 commit 9eb41d3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arrow-row/src/variable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ fn decode_binary_view_inner(
});

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

Expand Down

0 comments on commit 9eb41d3

Please sign in to comment.