emkornfield commented on a change in pull request #11059:
URL: https://github.com/apache/arrow/pull/11059#discussion_r700716530



##########
File path: cpp/src/arrow/array/util.cc
##########
@@ -169,8 +173,7 @@ class ArrayDataEndianSwapper {
     auto data = reinterpret_cast<const uint64_t*>(data_->buffers[1]->data());
     ARROW_ASSIGN_OR_RAISE(auto new_buffer, 
AllocateBuffer(data_->buffers[1]->size()));
     auto new_data = reinterpret_cast<uint64_t*>(new_buffer->mutable_data());
-    int64_t length = length_;
-    length = data_->buffers[1]->size() / (sizeof(uint64_t) * 4);
+    const int64_t length = data_->buffers[1]->size() / 32;

Review comment:
       Could we use the [contexpr 
value](https://github.com/apache/arrow/blob/27affa3181708c4f800f9d0a70603fb3390d6462/cpp/src/arrow/type.h#L956)?
  Same goes for Decimal128 




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