alamb commented on code in PR #7520:
URL: https://github.com/apache/arrow-rs/pull/7520#discussion_r2093384535
##########
arrow/benches/concatenate_kernel.rs:
##########
@@ -178,6 +177,50 @@ fn add_benchmark(c: &mut Criterion) {
c.bench_function("concat fixed size lists", |b| {
b.iter(|| bench_concat(&v1, &v2))
});
+
+ {
+ let batch_size = 1024;
+ let batch_count = 2;
+ let struct_arrays = (0..batch_count)
+ .map(|_| {
+ let ints = create_primitive_array::<Int32Type>(batch_size,
0.0);
+ let string_dict = create_sparse_dict_from_values::<Int32Type>(
+ batch_size,
+ 0.0,
+ &create_string_array_with_len::<i32>(20, 0.0, 10),
+ 0..10,
+ );
+ let int_dict = create_sparse_dict_from_values::<UInt16Type>(
+ batch_size,
+ 0.0,
+ &create_primitive_array::<Int64Type>(20, 0.0),
+ 0..10,
+ );
+ let fields = vec![
+ Field::new("int_field", ints.data_type().clone(), false),
+ Field::new("strings_dict_field",
string_dict.data_type().clone(), false),
+ Field::new("int_dict_field", int_dict.data_type().clone(),
false),
+ ];
+
+ StructArray::try_new(
+ fields.clone().into(),
+ vec![Arc::new(ints), Arc::new(string_dict),
Arc::new(int_dict)],
+ None,
+ )
+ .unwrap()
+ })
+ .collect::<Vec<_>>();
+
+ let array_refs = struct_arrays
Review Comment:
this is a really annoying part of the concat API
--
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]