alamb commented on a change in pull request #8852:
URL: https://github.com/apache/arrow/pull/8852#discussion_r537032454
##########
File path: rust/arrow/src/array/transform/mod.rs
##########
@@ -687,4 +690,24 @@ mod tests {
let expected = Int16Array::from(vec![Some(1), None]);
assert_eq!(result.keys(), &expected);
}
+
+ #[test]
+ fn test_binary_fixed_sized_offsets() {
+ let array =
+ FixedSizeBinaryArray::from(vec![vec![0, 0], vec![0, 1], vec![0,
2]]).data();
+ let array = array.slice(1, 2);
+
+ let arrays = vec![&array];
+
+ let mut mutable = MutableArrayData::new(arrays, false, 0);
+
+ mutable.extend(0, 1, 2);
+ mutable.extend(0, 0, 1);
+
+ let result = mutable.freeze();
+ let result = FixedSizeBinaryArray::from(Arc::new(result));
+
+ let expected = FixedSizeBinaryArray::from(vec![vec![0, 2], vec![0,
1]]);
Review comment:
oh, man, I missed the call to ` let array = array.slice(1, 2);` 👍
thanks @jorgecarleitao
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]