You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "viirya (via GitHub)" <gi...@apache.org> on 2023/03/29 21:28:40 UTC

[GitHub] [arrow-rs] viirya commented on a diff in pull request #3933: Add typed buffers to UnionArray (#3880)

viirya commented on code in PR #3933:
URL: https://github.com/apache/arrow-rs/pull/3933#discussion_r1152502184


##########
arrow/src/ffi.rs:
##########
@@ -1138,37 +1139,34 @@ mod tests {
         let expected_type_ids = vec![0_i8, 0, 1, 0];
 
         // Check type ids
-        assert_eq!(
-            Buffer::from_slice_ref(&expected_type_ids),
-            *array.data().buffers()[0]
-        );
+        assert_eq!(*array.type_ids(), expected_type_ids);
         for (i, id) in expected_type_ids.iter().enumerate() {
             assert_eq!(id, &array.type_id(i));
         }
 
         // Check offsets, sparse union should only have a single buffer, i.e. no offsets
-        assert_eq!(array.data().buffers().len(), 1);

Review Comment:
   👍 



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org