You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/08/07 21:30:54 UTC

[GitHub] [arrow] emkornfield commented on pull request #7915: ARROW-9671: [C++] Fix a bug in BasicDecimal128 constructor that interprets uint64_t integers with highest bit set as negative.

emkornfield commented on pull request #7915:
URL: https://github.com/apache/arrow/pull/7915#issuecomment-670721077


   Looks like formatting needs to be run:
   
   ```
      template <typename T,
   -            typename = typename std::enable_if<std::is_integral<T>::value &&
   -                                               (sizeof(T) <= sizeof(uint64_t)), T>::type>
   +            typename = typename std::enable_if<
   +                std::is_integral<T>::value && (sizeof(T) <= sizeof(uint64_t)), T>::type>
      constexpr BasicDecimal128(T value) noexcept
   -      : BasicDecimal128(value >= T{0} ? 0 : -1,
   -                        static_cast<uint64_t>(value)) {}
   +      : BasicDecimal128(value >= T{0} ? 0 : -1, static_cast<uint64_t>(value)) {}
   ```


----------------------------------------------------------------
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:
users@infra.apache.org