You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/01/11 12:33:46 UTC

[GitHub] [arrow-rs] tustvold commented on a change in pull request #1155: Restrict RecordReader and friends to POD types (#1132)

tustvold commented on a change in pull request #1155:
URL: https://github.com/apache/arrow-rs/pull/1155#discussion_r782102315



##########
File path: parquet/src/data_type.rs
##########
@@ -1032,6 +1033,21 @@ pub(crate) mod private {
             self
         }
     }
+
+    /// A marker trait for [`DataType`] with a [scalar] physical type
+    ///
+    /// This means that a `[Self::T::default()]` of length `len` can be safely created from a
+    /// zero-initialized `[u8]` with length `len * Self::get_type_size()` and
+    /// alignment of `Self::get_type_size()`
+    ///
+    /// [scalar]: https://doc.rust-lang.org/book/ch03-02-data-types.html#scalar-types
+    ///
+    pub trait ScalarDataType: DataType {}

Review comment:
       I also considered `PrimitiveDataType` or `PlainOldDataType` but thought this was less overloaded, and corresponds to the Rust nomenclature




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