holdenk / holdenk/spark-testing-base
assertDataFrameApproximateEquals failed
- Dominant language
- Scala
- Stars
- 1.6k
- Forks
- 357
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I have the following failed test, as you can see, the test fails on row 3 where the POSL_AVG is 0.53 and 0.52 from result and expected result respectively

The assert line is as follows
`assertDataFrameApproximateEquals(expectedData, monthlyPOSL, tol = 0.1)`
I have tried different values for "tol" (0.1, 0.011, -0.1, -0.011 etc) with no luck :(
Contributor guide
Research direction
Start from the assertDataFrameApproximateEquals assertion and reproduce the reported mismatch using the shown tolerance values and dataframe results. Check how the tolerance is interpreted for the POSL_AVG values, then confirm the behavior with a focused test covering the 0.53 versus 0.52 comparison.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100