mbrobbel commented on code in PR #7413:
URL: https://github.com/apache/arrow-rs/pull/7413#discussion_r2042091031


##########
arrow-buffer/src/buffer/scalar.rs:
##########
@@ -48,6 +48,13 @@ pub struct ScalarBuffer<T: ArrowNativeType> {
     phantom: PhantomData<T>,
 }
 
+impl<T: ArrowNativeType> Default for ScalarBuffer<T> {
+    #[inline]
+    fn default() -> Self {
+        Self::from(vec![])
+    }
+}
+

Review Comment:
   Maybe we can add a `Default` impl to `Buffer` (using the `Default` impl of 
`MutableBuffer` and 
https://docs.rs/arrow-buffer/latest/arrow_buffer/buffer/struct.MutableBuffer.html#impl-From%3CMutableBuffer%3E-for-Buffer),
 then we can derive `Default` here.



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