For fixing the correctness bug of
SPARK-28699, we disable radix sort for the scenario of repartition in Spark SQL. This will cause a performance regression.
So for limiting the performance overhead, we'll do the optimizing work by only enable sort for the repartition operation while stage retries happening. This work depends on