jorgecarleitao commented on a change in pull request #8850:
URL: https://github.com/apache/arrow/pull/8850#discussion_r537273177
##########
File path: rust/arrow/src/array/transform/mod.rs
##########
@@ -687,4 +728,118 @@ mod tests {
let expected = Int16Array::from(vec![Some(1), None]);
assert_eq!(result.keys(), &expected);
}
+
+ #[test]
+ fn test_struct() {
+ let strings: ArrayRef = Arc::new(StringArray::from(vec![
+ Some("joe"),
+ None,
+ None,
+ Some("mark"),
+ Some("doe"),
+ ]));
+ let ints: ArrayRef = Arc::new(Int32Array::from(vec![
+ Some(1),
+ Some(2),
+ Some(3),
+ Some(4),
+ Some(5),
+ ]));
+
+ let array =
+ StructArray::try_from(vec![("f1", strings.clone()), ("f2",
ints.clone())])
+ .unwrap()
+ .data();
+ let arrays = vec![array.as_ref()];
+ let mut mutable = MutableArrayData::new(arrays, false, 0);
+
+ mutable.extend(0, 1, 3);
Review comment:
I am sorry, I did not notice this comment. You are right, I will address
it on a separate PR.
----------------------------------------------------------------
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]