1. [MINOR][CORE][TEST] Remove unnecessary sort in UnsafeInMemorySorterSuite (commit: a2f65eb794c123e967e45f00f8b74dff24d2a28c) (details)
  2. [SPARK-24495][SQL] EnsureRequirement returns wrong plan when reordering (commit: e6bf325de1ea101264925deadb0476a65059e04a) (details)
Commit a2f65eb794c123e967e45f00f8b74dff24d2a28c by hyukjinkwon
[MINOR][CORE][TEST] Remove unnecessary sort in UnsafeInMemorySorterSuite
## What changes were proposed in this pull request?
We don't require specific ordering of the input data, the sort action is
not necessary and misleading.
## How was this patch tested?
Existing test suite.
Author: Xingbo Jiang <>
Closes #21536 from jiangxb1987/sorterSuite.
(cherry picked from commit 534065efeb51ff0d308fa6cc9dea0715f8ce25ad)
Signed-off-by: hyukjinkwon <>
(commit: a2f65eb794c123e967e45f00f8b74dff24d2a28c)
The file was modifiedcore/src/test/java/org/apache/spark/util/collection/unsafe/sort/ (diff)
Commit e6bf325de1ea101264925deadb0476a65059e04a by gatorsmile
[SPARK-24495][SQL] EnsureRequirement returns wrong plan when reordering
equal keys
`EnsureRequirement` in its `reorder` method currently assumes that the
same key appears only once in the join condition. This of course might
not be the case, and when it is not satisfied, it returns a wrong plan
which produces a wrong result of the query.
added UT
Author: Marco Gaido <>
Closes #21529 from mgaido91/SPARK-24495.
(cherry picked from commit fdadc4be08dcf1a06383bbb05e53540da2092c63)
Signed-off-by: Xiao Li <>
(commit: e6bf325de1ea101264925deadb0476a65059e04a)
The file was modifiedsql/core/src/main/scala/org/apache/spark/sql/execution/exchange/EnsureRequirements.scala (diff)
The file was modifiedsql/core/src/test/scala/org/apache/spark/sql/JoinSuite.scala (diff)
The file was modifiedsql/core/src/test/scala/org/apache/spark/sql/execution/PlannerSuite.scala (diff)