Rich-T-kid commented on code in PR #12088:
URL: https://github.com/apache/arrow-rs/pull/12088#discussion_r4485488999


##########
arrow-array/src/array/mod.rs:
##########
@@ -1093,9 +1105,34 @@ mod tests {
     use super::*;
     use crate::cast::{as_union_array, downcast_array};
     use crate::downcast_run_array;
+    use crate::types::Int8Type;
     use arrow_buffer::MutableBuffer;
     use arrow_schema::{Field, Fields, UnionFields, UnionMode};
 
+    #[test]
+    fn test_child_values_ptr_eq_same_arc() {
+        let dictionary = DictionaryArray::<Int8Type>::new(
+            Int8Array::from(vec![0, 1]),
+            Arc::new(StringArray::from(vec!["a", "b"])),
+        );
+        let values = Arc::clone(dictionary.values());
+
+        assert!(Arc::ptr_eq(dictionary.values(), &values));
+        assert!(child_values_ptr_eq(dictionary.values(), &values));
+    }
+
+    #[test]
+    fn test_child_values_ptr_eq_shared_buffers() {

Review Comment:
   added these in the latest commit



-- 
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]

Reply via email to