Kikkon commented on code in PR #5493:
URL: https://github.com/apache/arrow-rs/pull/5493#discussion_r1519956802
##########
arrow-data/src/data.rs:
##########
@@ -119,12 +119,22 @@ pub(crate) fn new_buffers(data_type: &DataType, capacity:
usize) -> [MutableBuff
buffer.push(0i32);
[buffer, empty_buffer]
}
+ DataType::ListView(_) => {
+ let mut buffer = MutableBuffer::new((1 + capacity) *
mem::size_of::<i64>());
+ buffer.push(0i32);
Review Comment:
> Is this correct? My reading of
https://arrow.apache.org/docs/format/Columnar.html#listview-layout is that a
ListView of length `n` will have an offsets and a sizes buffer both of length
`n`, instead of a single buffer of length `n + 1` like `ListArray`
Hi @tustvold
Based on the description in the
documentation:https://arrow.apache.org/docs/format/Columnar.html#listview-layout,
I modified the initialized buffer to be 2 * capacity, which means both the
offset buffer and the size buffer, is that correct?
--
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]