Commit 755b09d
[SPARK-55975][SQL][TESTS] NaN comparison can cause false UT failures due to different NaNs
### What changes were proposed in this pull request?
In the UTs, currently NaN comparisons can cause UT failures on the CI (which is also hardware dependent) as on some hardware NaN can be represented in different byte formats (see IEEE-754 that allows multiple bit patterns for NaN). This has caused spurious UT failures e.g. in #54676.
### Why are the changes needed?
Fix NaN comparison so that we do not run into hardware-dependent UT failures and correctly passes when there are two NaNs.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Added UT.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #54772 from mgaido91/SPARK-55975.
Authored-by: Marco Gaido <mgaido@fbk.eu>
Signed-off-by: Peter Toth <peter.toth@gmail.com>
(cherry picked from commit e7bbd32)
Signed-off-by: Peter Toth <peter.toth@gmail.com>1 parent 88704b9 commit 755b09d
File tree
2 files changed
+12
-0
lines changed- sql/core/src/test/scala/org/apache/spark/sql
2 files changed
+12
-0
lines changedLines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
120 | 129 | | |
121 | 130 | | |
122 | 131 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
| 408 | + | |
408 | 409 | | |
| 410 | + | |
409 | 411 | | |
410 | 412 | | |
| 413 | + | |
411 | 414 | | |
412 | 415 | | |
413 | 416 | | |
| |||
0 commit comments