Uh oh!
There was an error while loading. Please reload this page.
[SPARK-36754][SQL] ArrayIntersect handle duplicated Double.NaN and Float.NaN - #33995
[SPARK-36754][SQL] ArrayIntersect handle duplicated Double.NaN and Float.NaN#33995AngersZhuuuu wants to merge 23 commits into
Conversation
SparkQA
commented
Sep 14, 2021
Kubernetes integration test unable to build dist. exiting with code: 1 |
| hsResult.add(elem) | ||
| if (isNaN(elem)) { | ||
| if (hs.containsNaN() && !hsResult.containsNaN()) { | ||
| arrayBuffer += elem |
There was a problem hiding this comment.
For this, let's wait a little bit for the decision at the first PR.
SparkQA
commented
Sep 14, 2021
Test build #143265 has finished for PR 33995 at commit
|
SparkQA
commented
Sep 15, 2021
Kubernetes integration test unable to build dist. exiting with code: 1 |
SparkQA
commented
Sep 15, 2021
Test build #143308 has finished for PR 33995 at commit
|
AngersZhuuuu
commented
Sep 16, 2021
ping @cloud-fan |
SparkQA
commented
Sep 17, 2021
Kubernetes integration test unable to build dist. exiting with code: 1 |
SparkQA
commented
Sep 17, 2021
Test build #143396 has finished for PR 33995 at commit
|
AngersZhuuuu
commented
Sep 17, 2021
ping @cloud-fan |
SparkQA
commented
Sep 17, 2021
Kubernetes integration test starting |
SparkQA
commented
Sep 17, 2021
Kubernetes integration test status failure |
SparkQA
commented
Sep 17, 2021
Test build #143412 has finished for PR 33995 at commit
|
…oat.NaN
### What changes were proposed in this pull request?
For query
```
select array_intersect(array(cast('nan' as double), 1d), array(cast('nan' as double)))
```
This returns [NaN], but it should return [].
This issue is caused by `OpenHashSet` can't handle `Double.NaN` and `Float.NaN` too.
In this pr fix this based on #33955
### Why are the changes needed?
Fix bug
### Does this PR introduce _any_ user-facing change?
ArrayIntersect won't show equal `NaN` value
### How was this patch tested?
Added UT
Closes#33995 from AngersZhuuuu/SPARK-36754.
Authored-by: Angerszhuuuu <angers.zhu@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit 2fc7f2f)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>…oat.NaN
### What changes were proposed in this pull request?
For query
```
select array_intersect(array(cast('nan' as double), 1d), array(cast('nan' as double)))
```
This returns [NaN], but it should return [].
This issue is caused by `OpenHashSet` can't handle `Double.NaN` and `Float.NaN` too.
In this pr fix this based on #33955
### Why are the changes needed?
Fix bug
### Does this PR introduce _any_ user-facing change?
ArrayIntersect won't show equal `NaN` value
### How was this patch tested?
Added UT
Closes#33995 from AngersZhuuuu/SPARK-36754.
Authored-by: Angerszhuuuu <angers.zhu@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit 2fc7f2f)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>…oat.NaN
### What changes were proposed in this pull request?
For query
```
select array_intersect(array(cast('nan' as double), 1d), array(cast('nan' as double)))
```
This returns [NaN], but it should return [].
This issue is caused by `OpenHashSet` can't handle `Double.NaN` and `Float.NaN` too.
In this pr fix this based on #33955
### Why are the changes needed?
Fix bug
### Does this PR introduce _any_ user-facing change?
ArrayIntersect won't show equal `NaN` value
### How was this patch tested?
Added UT
Closes#33995 from AngersZhuuuu/SPARK-36754.
Authored-by: Angerszhuuuu <angers.zhu@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit 2fc7f2f)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>cloud-fan
commented
Sep 20, 2021
thanks, merging to master/3.2/3.1/3.0! |
karenfeng
commented
Sep 27, 2021
For clarification @AngersZhuuuu: the PR description says:
Is this the right way around? It seems like we now correctly return |
AngersZhuuuu
commented
Sep 28, 2021
Oh, sorry for the mistake. Correct is we should return [NaN] |
…oat.NaN
### What changes were proposed in this pull request?
For query
```
select array_intersect(array(cast('nan' as double), 1d), array(cast('nan' as double)))
```
This returns [NaN], but it should return [].
This issue is caused by `OpenHashSet` can't handle `Double.NaN` and `Float.NaN` too.
In this pr fix this based on apache#33955
### Why are the changes needed?
Fix bug
### Does this PR introduce _any_ user-facing change?
ArrayIntersect won't show equal `NaN` value
### How was this patch tested?
Added UT
Closesapache#33995 from AngersZhuuuu/SPARK-36754.
Authored-by: Angerszhuuuu <angers.zhu@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit 2fc7f2f)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
What changes were proposed in this pull request?
For query
This returns [NaN], but it should return [].
This issue is caused by
OpenHashSetcan't handleDouble.NaNandFloat.NaNtoo.In this pr fix this based on #33955
Why are the changes needed?
Fix bug
Does this PR introduce any user-facing change?
ArrayIntersect won't show equal
NaNvalueHow was this patch tested?
Added UT