https://github.com/apache/spark
Revision 16986b29e22553797e0e78df445eac94a44285c7 authored by Wenchen Fan on 18 December 2018, 18:09:56 UTC, committed by Dongjoon Hyun on 18 December 2018, 18:10:30 UTC
## What changes were proposed in this pull request?

This is kind of a followup of https://github.com/apache/spark/pull/23239

The `UnsafeProject` will normalize special float/double values(NaN and -0.0), so the sorter doesn't have to handle it.

However, for consistency and future-proof, this PR proposes to normalize `-0.0` in the prefix comparator, so that it's same with the normal ordering. Note that prefix comparator handles NaN as well.

This is not a bug fix, but a safe guard.

## How was this patch tested?

existing tests

Closes #23334 from cloud-fan/sort.

Authored-by: Wenchen Fan <wenchen@databricks.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit befca983d2da4f7828aa7a7cd7345d17c4f291dd)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
1 parent 0a69787
History
Tip revision: 16986b29e22553797e0e78df445eac94a44285c7 authored by Wenchen Fan on 18 December 2018, 18:09:56 UTC
[SPARK-26382][CORE] prefix comparator should handle -0.0
Tip revision: 16986b2

README.md

back to top