File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
cpp/src/arrow/compute/kernels Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -4152,6 +4152,14 @@ class TestRandomQuantileKernel : public TestPrimitiveQuantileKernel<ArrowType> {
41524152
41534153 void VerifyTDigest (const std::shared_ptr<ChunkedArray>& chunked,
41544154 std::vector<double >& quantiles) {
4155+ // For some reasons computations on macOS seem much more approximate.
4156+ // A possible explanation is that libc++ has less precise implementations
4157+ // of std::sin and std::asin, used in the TDigest implementation.
4158+ #ifdef __APPLE__
4159+ constexpr double kRelativeTolerance = 0.09 ;
4160+ #else
4161+ constexpr double kRelativeTolerance = 0.05 ;
4162+ #endif
41554163 TDigestOptions options (quantiles);
41564164 ASSERT_OK_AND_ASSIGN (Datum out, TDigest (chunked, options));
41574165 const auto & out_array = out.make_array ();
You can’t perform that action at this time.
0 commit comments