@yjshen , Sorry for bothering you, Why need `positions.sort_unstable()` below https://github.com/apache/arrow-datafusion/blob/807b7a5f7eb858e9f7162e1f00ffeeedd0bf2050/datafusion/core/src/physical_plan/sorts/sort.rs#L460-L469 I think we should keep the order of the adding index in `positions `, so we can keep the order from `indices `, the result has correctly order. https://github.com/apache/arrow-datafusion/blob/807b7a5f7eb858e9f7162e1f00ffeeedd0bf2050/datafusion/core/src/physical_plan/sorts/sort.rs#L433-L435