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


##########
arrow/src/row/mod.rs:
##########
@@ -358,6 +358,14 @@ impl SortField {
     pub fn new_with_options(data_type: DataType, options: SortOptions) -> Self 
{
         Self { options, data_type }
     }
+
+    /// Return size of this instance in bytes.
+    ///
+    /// Includes the size of `Self`.
+    pub fn size(&self) -> usize {
+        self.data_type.size() + std::mem::size_of::<Self>()
+            - std::mem::size_of::<DataType>()

Review Comment:
   `self.data_type.size()` isn't equal to `std::mem::size_of::<DataType>()`?



-- 
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-unsubscr...@arrow.apache.org

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

Reply via email to