-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-28699][SQL] Disable using radix sort for ShuffleExchangeExec in repartition case #25491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
1256c87
398a891
ec57677
8bf4cc8
c692265
2e26335
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -242,7 +242,7 @@ object ShuffleExchangeExec { | |
| } | ||
| // The comparator for comparing row hashcode, which should always be Integer. | ||
| val prefixComparator = PrefixComparators.LONG | ||
| val canUseRadixSort = SQLConf.get.enableRadixSort | ||
|
|
||
| // The prefix computer generates row hashcode as the prefix, so we may decrease the | ||
| // probability that the prefixes are equal when input rows choose column values from a | ||
| // limited range. | ||
|
|
@@ -264,7 +264,11 @@ object ShuffleExchangeExec { | |
| prefixComparator, | ||
| prefixComputer, | ||
| pageSize, | ||
| canUseRadixSort) | ||
| // As we need to compare the binary of UnsafeRow here, we can't make sure whether all | ||
| // the fields can sort fully with prefix like SortExec. So we disable radix sort here | ||
| // to avoid getting unstable sort, and result to a correctness bug. | ||
| // See more details in SPARK-28699. | ||
| false /* canUseRadixSort */) | ||
|
||
| sorter.sort(iter.asInstanceOf[Iterator[UnsafeRow]]) | ||
| } | ||
| } else { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy, shorten it in 8bf4cc8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @cloud-fan . Is this the only one for this topic? Or, do we have more TODO items against old branches (
branch-2.4andbranch-2.3)?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have one more: #25498 , which will be merged soon, after tests pass.
The current PR may need more time. We need to collect feedback about whether we should disable "sort before repartition" by default. cc @jiangxb1987