You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "emilk (via GitHub)" <gi...@apache.org> on 2025/04/14 12:45:09 UTC

[PR] Implement `Eq` for `ScalarBuffer` when `T: Eq` [arrow-rs]

emilk opened a new pull request, #7412:
URL: https://github.com/apache/arrow-rs/pull/7412

   # Which issue does this PR close?
   * Part of https://github.com/apache/arrow-rs/issues/7411


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


Re: [PR] Implement `Eq` for `ScalarBuffer` when `T: Eq` [arrow-rs]

Posted by "jayzhan211 (via GitHub)" <gi...@apache.org>.
jayzhan211 merged PR #7412:
URL: https://github.com/apache/arrow-rs/pull/7412


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


Re: [PR] Implement `Eq` for `ScalarBuffer` when `T: Eq` [arrow-rs]

Posted by "mbrobbel (via GitHub)" <gi...@apache.org>.
mbrobbel commented on code in PR #7412:
URL: https://github.com/apache/arrow-rs/pull/7412#discussion_r2042096510


##########
arrow-buffer/src/buffer/scalar.rs:
##########
@@ -342,4 +345,19 @@ mod tests {
         assert_eq!(vec, input.as_slice());
         assert_ne!(vec.as_ptr(), input.as_ptr());
     }
+
+    #[test]
+    fn scalar_buffer_impl_eq() {
+        fn are_equal<T: Eq>(a: &T, b: &T) -> bool {
+            a.eq(b)
+        }
+
+        assert!(
+            are_equal(
+                &ScalarBuffer::<i16>::from(vec![23]),
+                &ScalarBuffer::<i16>::from(vec![23])
+            ),
+            "ScalarBuffer should implement Eq if the inner typedoes"

Review Comment:
   ```suggestion
               "ScalarBuffer should implement Eq if the inner type does"
   ```



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


Re: [PR] Implement `Eq` for `ScalarBuffer` when `T: Eq` [arrow-rs]

Posted by "jayzhan211 (via GitHub)" <gi...@apache.org>.
jayzhan211 commented on PR #7412:
URL: https://github.com/apache/arrow-rs/pull/7412#issuecomment-2803459324

   Thanks @emilk @mbrobbel 


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