tustvold commented on code in PR #2221:
URL: https://github.com/apache/arrow-rs/pull/2221#discussion_r933395276
##########
parquet/src/arrow/arrow_writer/mod.rs:
##########
@@ -619,55 +560,20 @@ fn write_leaf(
Ok(written as i64)
}
-macro_rules! def_get_binary_array_fn {
- ($name:ident, $ty:ty) => {
- fn $name(array: &$ty) -> Vec<ByteArray> {
- let mut byte_array = ByteArray::new();
- let ptr = crate::util::memory::ByteBufferPtr::new(
- array.value_data().as_slice().to_vec(),
- );
- byte_array.set_data(ptr);
- array
- .value_offsets()
- .windows(2)
- .enumerate()
- .filter_map(|(i, offsets)| {
- if array.is_valid(i) {
- let start = offsets[0] as usize;
- let len = offsets[1] as usize - start;
- Some(byte_array.slice(start, len))
- } else {
- None
- }
- })
- .collect()
- }
- };
-}
-
-// TODO: These methods don't handle non null indices correctly (#1753)
-def_get_binary_array_fn!(get_binary_array, arrow_array::BinaryArray);
Review Comment:
Removing these fixes #1753
--
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]