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 2021/07/15 20:10:56 UTC

[GitHub] [arrow] edponce edited a comment on pull request #10727: ARROW-12745: [C++][Compute] Add floor, ceiling, and truncate kernels

edponce edited a comment on pull request #10727:
URL: https://github.com/apache/arrow/pull/10727#issuecomment-880964640


   Tests fail for `std::numeric_limits<unsigned long long>::min/max()` due to an invalid range when checking integer with floating-point result.
   The tests are:
   ```
   this->AssertUnaryOp(floor, this->MakeScalar(min), *arrow::MakeScalar(float64(), min));
   this->AssertUnaryOp(floor, this->MakeScalar(max), *arrow::MakeScalar(float64(), max));
   ```
   
   The error message generated is:
   ```
   '_error_or_value11.status()' failed with Invalid: Integer value 18446744073709551615
     not in range: 0 to 9007199254740992
   ```
   
   Here is some context of what these numbers represent:
   ```
   max(unsigned long long int) = 18446744073709551615
   max(mantissa of double is 54 bits) = 9007199254740992
   ```
   
   This error is most likely due to the [Arrow testing logic when checking integer ranges](https://github.com/apache/arrow/blob/master/cpp/src/arrow/util/int_util.cc#L601-L618) for comparing values in test assertions.
   
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org