paddyhoran commented on a change in pull request #9212:
URL: https://github.com/apache/arrow/pull/9212#discussion_r559286943
##########
File path: rust/arrow/src/datatypes.rs
##########
@@ -199,11 +199,18 @@ pub struct Field {
metadata: Option<BTreeMap<String, String>>,
}
-pub trait ArrowNativeType:
- fmt::Debug + Send + Sync + Copy + PartialOrd + FromStr + Default + 'static
-{
+/// Trait declaring any type that is serializable to JSON. This includes all
primitive types (bool, i32, etc.).
+pub trait JsonSerializable: 'static {
fn into_json_value(self) -> Option<Value>;
+}
+/// Trait expressing a Rust type that has the same in-memory representation
+/// as Arrow. This includes `i16`, `f32`, but excludes `bool` (which in arrow
is represented in bits).
+/// In little endian machines, types that implement [`ArrowNativeType`] can be
memcopied to arrow buffers
Review comment:
It does not require it but is [little-endian by
default](https://arrow.apache.org/docs/format/Columnar.html#byte-order-endianness).
I recall someone wanting to add big-endian support to the C++ impl.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]