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

[GitHub] [arrow-rs] alamb commented on a diff in pull request #3899: Array equality for &dyn Array (#3880)

alamb commented on code in PR #3899:
URL: https://github.com/apache/arrow-rs/pull/3899#discussion_r1145254678


##########
arrow/tests/array_equal.rs:
##########
@@ -31,14 +32,11 @@ use std::sync::Arc;
 #[test]
 fn test_null_equal() {
     let a = NullArray::new(12);
-    let a = a.data();
     let b = NullArray::new(12);
-    let b = b.data();
-    test_equal(a, b, true);
+    test_equal(&a, &b, true);

Review Comment:
   That is certainly nicer



##########
arrow-array/src/array/mod.rs:
##########
@@ -425,13 +425,13 @@ pub trait ArrayAccessor: Array {
     unsafe fn value_unchecked(&self, index: usize) -> Self::Item;
 }
 
-impl PartialEq for dyn Array {
+impl PartialEq for dyn Array + '_ {

Review Comment:
   I don't even understand what this means -- "any lifeime"?



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