arrow: [C++] Test failure in arrow-compute-aggregate-test
While building for Arch Linux, I’m observing 4 tests failures in the aforementioned suite:
[ RUN ] TestRandomInt64QuantileKernel.Overlapped
/build/arrow/src/apache-arrow-7.0.0/cpp/src/arrow/compute/kernels/aggregate_test.cc:3234: Failure
Value of: (quantiles[j] == numeric_scalar->value) || (std::isnan(quantiles[j]) && std::isnan(numeric_scalar->value))
Actual: false
Expected: true
[ FAILED ] TestRandomInt64QuantileKernel.Overlapped (6 ms)
[ RUN ] TestRandomInt64QuantileKernel.Sliced
/build/arrow/src/apache-arrow-7.0.0/cpp/src/arrow/compute/kernels/aggregate_test.cc:3234: Failure
Value of: (quantiles[j] == numeric_scalar->value) || (std::isnan(quantiles[j]) && std::isnan(numeric_scalar->value))
Actual: false
Expected: true
[ FAILED ] TestRandomInt64QuantileKernel.Sliced (25 ms)
[ RUN ] TestRandomFloatQuantileKernel.Exact
/build/arrow/src/apache-arrow-7.0.0/cpp/src/arrow/compute/kernels/aggregate_test.cc:3234: Failure
Value of: (quantiles[j] == numeric_scalar->value) || (std::isnan(quantiles[j]) && std::isnan(numeric_scalar->value))
Actual: false
Expected: true
[ FAILED ] TestRandomFloatQuantileKernel.Exact (0 ms)
[ RUN ] TestRandomFloatQuantileKernel.Sliced
/build/arrow/src/apache-arrow-7.0.0/cpp/src/arrow/compute/kernels/aggregate_test.cc:3234: Failure
Value of: (quantiles[j] == numeric_scalar->value) || (std::isnan(quantiles[j]) && std::isnan(numeric_scalar->value))
Actual: false
Expected: true
/build/arrow/src/apache-arrow-7.0.0/cpp/src/arrow/compute/kernels/aggregate_test.cc:3234: Failure
Value of: (quantiles[j] == numeric_scalar->value) || (std::isnan(quantiles[j]) && std::isnan(numeric_scalar->value))
Actual: false
Expected: true
/build/arrow/src/apache-arrow-7.0.0/cpp/src/arrow/compute/kernels/aggregate_test.cc:3234: Failure
Value of: (quantiles[j] == numeric_scalar->value) || (std::isnan(quantiles[j]) && std::isnan(numeric_scalar->value))
Actual: false
Expected: true
/build/arrow/src/apache-arrow-7.0.0/cpp/src/arrow/compute/kernels/aggregate_test.cc:3234: Failure
Value of: (quantiles[j] == numeric_scalar->value) || (std::isnan(quantiles[j]) && std::isnan(numeric_scalar->value))
Actual: false
Expected: true
[ FAILED ] TestRandomFloatQuantileKernel.Sliced (0 ms)
They are also happening with 6.0.1, but were not sometime ago so I suspect an update in some of arrow dependencies to be responsible for this. I’m happy to provide any information that could be useful, but I don’t want to create an account on JIRA, I try to limit the number of accounts I have everywhere.
About this issue
- Original URL
- State: open
- Created 5 years ago
- Comments: 26 (21 by maintainers)
Commits related to this issue
- addpatch: arrow 19.0.1 https://github.com/apache/arrow/issues/12681#issuecomment-2490255120 — committed to Cryolitia-Forks/archriscv-packages by Cryolitia 2 years ago
- addpatch: arrow 19.0.1 https://github.com/apache/arrow/issues/12681#issuecomment-2490255120 — committed to Cryolitia-Forks/archriscv-packages by Cryolitia 2 years ago
- addpatch: arrow 19.0.1-7 https://github.com/apache/arrow/issues/12681#issuecomment-2490255120 — committed to Cryolitia-Forks/archriscv-packages by Cryolitia 2 years ago
- addpatch: arrow 19.0.1-7 https://github.com/apache/arrow/issues/12681#issuecomment-2490255120 — committed to felixonmars/archriscv-packages by Cryolitia 2 years ago
(JFTR, addition and multiplication should be commutative for floating point numbers, associative is what they might not be)
Okay, so that might be because the compiled code uses FMADD which potentially removes one rounding step, yielding slightly different results.
We can probably simply relax the test a tiny little bit.
Given that this is gonna come up in other situations, we may add some helper functions:
I can write those helpers if that sounds ok.