commit | 4f6adc700d1cebc50a0594b5aa671f64491cc20e | [log] [tgz] |
---|---|---|
author | Yordan Pavlov <yordan.pavlov@outlook.com> | Thu Mar 04 14:45:08 2021 -0500 |
committer | Andrew Lamb <andrew@nerdnetworks.org> | Thu Mar 04 14:45:08 2021 -0500 |
tree | 0bbe34eaebebd52efcd7fba288703dfe38d585f2 | |
parent | ec5934ad8e6aec99f495b094826f69e6df3f6d2b [diff] |
ARROW-11799: [Rust] fix len of string and binary arrays created from unbound iterator While looking for a way to make loading array data from parquet files faster, I stumbled on an edge case where string and binary arrays are created with an incorrect length from an iterator with no upper bound. Here is an example for such an iterator: ``` // iterator that doesn't declare (upper) size bound let string_iter = (0..).scan(0usize, |pos, i| { if *pos < 10 { *pos += 1; Some(Some(format!("value {}", i))) } else { // actually returns up to 10 values None } }) // limited using take() .take(100); ``` For even more details please see the new tests I have added in this PR. Fortunately this is easy to fix by using the length of the child offset array. @jorgecarleitao Closes #9588 from yordan-pavlov/fix_array_len_from_unbound_iter Authored-by: Yordan Pavlov <yordan.pavlov@outlook.com> Signed-off-by: Andrew Lamb <andrew@nerdnetworks.org>
Apache Arrow is a development platform for in-memory analytics. It contains a set of technologies that enable big data systems to process and move data fast.
Major components of the project include:
Arrow is an Apache Software Foundation project. Learn more at arrow.apache.org.
The reference Arrow libraries contain many distinct software components:
The official Arrow libraries in this repository are in different stages of implementing the Arrow format and related features. See our current feature matrix on git master.
Please read our latest project contribution guide.
Even if you do not plan to contribute to Apache Arrow itself or Arrow integrations in other projects, we'd be happy to have you involved: