alamb commented on code in PR #6593:
URL: https://github.com/apache/arrow-rs/pull/6593#discussion_r1809227281
##########
arrow-array/src/builder/struct_builder.rs:
##########
@@ -275,6 +276,31 @@ pub fn make_builder(datatype: &DataType, capacity: usize)
-> Box<dyn ArrayBuilde
t => panic!("The field of Map data type {t:?} should has a child
Struct field"),
},
DataType::Struct(fields) =>
Box::new(StructBuilder::from_fields(fields.clone(), capacity)),
+ DataType::Dictionary(key_type, value_type) if **key_type ==
DataType::Int32 => {
+ match &**value_type {
+ DataType::Utf8 => {
+ let dict_builder: StringDictionaryBuilder<Int32Type> =
+ StringDictionaryBuilder::with_capacity(capacity, 32,
1024);
Review Comment:
Looks to me like the standard capacity is `256` for values in
https://github.com/apache/arrow-rs/blob/20433530e7f60fa9ff45ae7c51c3e5ab27c7a2d0/arrow-array/src/array/dictionary_array.rs#L659-L658
I'll push a commit to match that.
--
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]