jorgecarleitao opened a new pull request #9212:
URL: https://github.com/apache/arrow/pull/9212


   This PR removes any risk of boolean values to be converted to bytes via 
`ToByteSlice` by explicitly making `ArrowNativeType` be only used in types 
whose in-memory representation in Rust equates to the in-memory representation 
in Arrow. `bool` in Rust is a byte and in Arrow it is a bit.
   
   Overall, the direction of this PR is to have the traits represent one aspect 
of the type. In this case, `ArrowNativeType` is currently 
   * a type that has the same in memory representation (ToByteSlice is 
implemented for it)
   * a json serializable type
   * something that can be casted to/from `usize`.
   
   This poses a problem because:
   
   1. bools are serializable, not castable to usize, have different memory 
representation
   2. fixed size (iX, uX) are serializable, castable to usize, have the same 
memory representation
   3. fixed floating (f32, f64) are serializable, not castable to usize, have 
the same memory representation
   
   however, they all implement `ArrowNativeType`.
   
   This PR focus on splitting the json-serializable part of it.


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


Reply via email to