alamb commented on code in PR #6808:
URL: https://github.com/apache/arrow-rs/pull/6808#discussion_r1861151493
##########
arrow-data/src/transform/mod.rs:
##########
@@ -627,13 +628,19 @@ impl<'a> MutableArrayData<'a> {
_ => (None, false),
};
- let variadic_data_buffers = match &data_type {
- DataType::BinaryView | DataType::Utf8View => arrays
- .iter()
- .flat_map(|x| x.buffers().iter().skip(1))
- .map(Buffer::clone)
- .collect(),
- _ => vec![],
+ let (variadic_data_buffers, buffer_to_idx) = match &data_type {
+ DataType::BinaryView | DataType::Utf8View => {
+ let mut buffer_to_idx = HashMap::new();
Review Comment:
I wonder if building a hashmap / vec would be overly expensive (though we
would need to run benchmarks to be sure)
cc @XiangpengHao
--
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]