You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by tu...@apache.org on 2022/09/27 15:32:22 UTC
[arrow-rs] branch master updated: fix(arrow-array): fix BinaryBuilder and StringBuilder initialization parameters in struct_builder (#2784)
This is an automated email from the ASF dual-hosted git repository.
tustvold pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/master by this push:
new 333633e07 fix(arrow-array): fix BinaryBuilder and StringBuilder initialization parameters in struct_builder (#2784)
333633e07 is described below
commit 333633e07f63f360f549709a56653b7852c6e59a
Author: chunshao.rcs <wo...@163.com>
AuthorDate: Tue Sep 27 23:32:16 2022 +0800
fix(arrow-array): fix BinaryBuilder and StringBuilder initialization parameters in struct_builder (#2784)
---
arrow-array/src/builder/struct_builder.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arrow-array/src/builder/struct_builder.rs b/arrow-array/src/builder/struct_builder.rs
index cadc8a529..619931403 100644
--- a/arrow-array/src/builder/struct_builder.rs
+++ b/arrow-array/src/builder/struct_builder.rs
@@ -105,14 +105,14 @@ pub fn make_builder(datatype: &DataType, capacity: usize) -> Box<dyn ArrayBuilde
DataType::UInt64 => Box::new(UInt64Builder::with_capacity(capacity)),
DataType::Float32 => Box::new(Float32Builder::with_capacity(capacity)),
DataType::Float64 => Box::new(Float64Builder::with_capacity(capacity)),
- DataType::Binary => Box::new(BinaryBuilder::with_capacity(1024, capacity)),
+ DataType::Binary => Box::new(BinaryBuilder::with_capacity(capacity, 1024)),
DataType::FixedSizeBinary(len) => {
Box::new(FixedSizeBinaryBuilder::with_capacity(capacity, *len))
}
DataType::Decimal128(precision, scale) => Box::new(
Decimal128Builder::with_capacity(capacity, *precision, *scale),
),
- DataType::Utf8 => Box::new(StringBuilder::with_capacity(1024, capacity)),
+ DataType::Utf8 => Box::new(StringBuilder::with_capacity(capacity, 1024)),
DataType::Date32 => Box::new(Date32Builder::with_capacity(capacity)),
DataType::Date64 => Box::new(Date64Builder::with_capacity(capacity)),
DataType::Time32(TimeUnit::Second) => {