Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions cpp/src/arrow/compute/kernels/aggregate_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3849,10 +3849,9 @@ class TestPrimitiveQuantileKernel : public ::testing::Test {
for (int64_t j = 0; j < out_array->length(); ++j) {
const auto& numeric_scalar =
checked_pointer_cast<DoubleScalar>(expected[j][i].scalar());
ASSERT_TRUE((quantiles[j] == numeric_scalar->value) ||
(std::isnan(quantiles[j]) && std::isnan(numeric_scalar->value)))
<< " Actual Value: " << quantiles[j] << "\n"
<< "Expected Value: " << numeric_scalar->value;
// The results may not be rigorously equal to the "naive" results
// on some architecture and/or with some compiler flags (GH-12681).
AssertWithinUlp(quantiles[j], numeric_scalar->value, 1);
Comment on lines +3852 to +3854

@andishgar andishgar Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pitrou , I forgot to mention one more thing: ULP-based comparison is inappropriate for LOWER, HIGHER, and NEAREST, since these interpolation methods are expected to return an unchanged input value.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it's not inappropriate, but you're right it's less strict than ideal :)

}
} else {
AssertTypeEqual(out_array->type(), type_singleton());
Expand Down
Loading