-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Currently sorts always requires the input partitioning to be 1, thus first merging the input partitions and doing sorting on one partitions.
We can use the SortPreservingMergeExec to execute sorts in parallel and merge them afterwards.
As mentioned in #3516 Top-K kind of queries can already benefit from this in terms of execution time, as the merge only needs to find the first N values.
Describe the solution you'd like
If target paritions is bigger than 1 (child partitions are bigger than 1), or child partitions are more than 1, execute sort in parallel.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.