Bei-z commented on a change in pull request #8542:
URL: https://github.com/apache/arrow/pull/8542#discussion_r516900753
##########
File path: cpp/src/arrow/util/basic_decimal.cc
##########
@@ -575,8 +572,7 @@ template <class DecimalClass>
static DecimalStatus DecimalDivide(const DecimalClass& dividend,
const DecimalClass& divisor, DecimalClass*
result,
DecimalClass* remainder) {
- static int64_t kDecimalArrayLength =
- std::is_same<DecimalClass, BasicDecimal128>::value ? 4 : 8;
+ static constexpr int64_t kDecimalArrayLength = sizeof(DecimalClass) /
sizeof(uint32_t);
Review comment:
Changed accordingly. Thank you for pointing out!
----------------------------------------------------------------
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]