kiszk commented on a change in pull request #7136:
URL: https://github.com/apache/arrow/pull/7136#discussion_r422575176



##########
File path: cpp/src/arrow/util/bit_util.h
##########
@@ -358,53 +359,61 @@ static inline void ByteSwap(void* dst, const void* src, 
int len) {
 
 // Convert to little/big endian format from the machine's native endian format.
 #if ARROW_LITTLE_ENDIAN
-template <typename T, typename = internal::EnableIfIsOneOf<T, int64_t, 
uint64_t, int32_t,
-                                                           uint32_t, int16_t, 
uint16_t>>
+template <typename T,

Review comment:
       This change is to avoid unexpected data swapping when uint8 is passed.   
   Before this PR, unexpected data swap for uint8 occurred since uint8 was cast 
to uint16.




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