diff --git a/src/io/parquet/write/mod.rs b/src/io/parquet/write/mod.rs index a9537592b11..b40fccac59e 100644 --- a/src/io/parquet/write/mod.rs +++ b/src/io/parquet/write/mod.rs @@ -298,9 +298,7 @@ pub fn array_to_page( primitive::array_to_page::(&array, options, descriptor) } else { let size = decimal_length_from_precision(precision); - - let mut values = MutableBuffer::::new(); // todo: this can be estimated - + let mut values = MutableBuffer::::with_capacity(size * array.len()); array.values().iter().for_each(|x| { let bytes = &x.to_be_bytes()[16 - size..]; values.extend_from_slice(bytes)