kou commented on code in PR #48180:
URL: https://github.com/apache/arrow/pull/48180#discussion_r2562038802


##########
cpp/src/arrow/compute/util.cc:
##########
@@ -47,17 +43,20 @@ inline uint64_t SafeLoadUpTo8Bytes(const uint8_t* bytes, 
int num_bytes) {
 }
 
 inline void SafeStoreUpTo8Bytes(uint8_t* bytes, int num_bytes, uint64_t value) 
{
-  // This will not be correct on big-endian architectures.
-#if !ARROW_LITTLE_ENDIAN
-  ARROW_DCHECK(false);
-#endif
   ARROW_DCHECK(num_bytes >= 0 && num_bytes <= 8);
   if (num_bytes == 8) {
     util::SafeStore(reinterpret_cast<uint64_t*>(bytes), value);

Review Comment:
   Hmm... I haven't seen the changes in 
https://github.com/apache/arrow/pull/48180/files#diff-ecbf847c1b02ae3e2118d9d73fdb2a279e5b3107d1cdc4a7779a31b0fef9ed4cR35
 .
   
   I'm mentioning this part in 
https://github.com/apache/arrow/pull/48180#pullrequestreview-3496008897 here:
   
   ```diff
   +#if ARROW_LITTLE_ENDIAN
        util::SafeStore(reinterpret_cast<uint64_t*>(bytes), value);
   +#else
   +    util::SafeStore(reinterpret_cast<uint64_t*>(bytes), 
bit_util::ByteSwap(value));
   +#endif
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to