Fix flaky TPC-H Q15 floating-point assertion#5629
Conversation
Signed-off-by: Kai Huang <ahkcs@amazon.com>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Description
Updates the TPC-H Q15 integration test to use the existing ULP-aware
MatcherUtils.closeTo(...)matcher fortotal_revenue.The distributed
sum()returned797313.3838000001in the failing release test instead of the exactly asserted797313.3838. These values differ by one ULP, butrows(...)requires exact numeric equality.closeTo(...)tolerates platform-dependent floating-point rounding while continuing to compare the supplier ID and string fields exactly.Related Issues
Resolves #5620
Testing
./gradlew :integ-test:spotlessJavaCheck :integ-test:compileTestJava --no-daemon./gradlew :integ-test:integTest --tests "org.opensearch.sql.calcite.tpch.CalcitePPLTpchIT.testQ15" --no-daemonCheck List
--signoffor-s.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.