pitrou commented on code in PR #35997:
URL: https://github.com/apache/arrow/pull/35997#discussion_r1229413297


##########
cpp/src/arrow/util/basic_decimal.cc:
##########
@@ -1188,14 +857,14 @@ BasicDecimal256& BasicDecimal256::operator<<=(uint32_t 
bits) {
   if (bits == 0) {
     return *this;
   }
-  int cross_word_shift = bits / 64;
-  if (static_cast<size_t>(cross_word_shift) >= array_.size()) {
+  const int cross_word_shift = bits / 64;
+  if (cross_word_shift >= kWordWidth) {

Review Comment:
   You're right that it's confusing. I'll rename it to `kNumWords`.



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