Skip to content

Execute sorts in parallel when limit is used after sort #3526

Closed

Description

@Dandandan

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.

Activity

  1. changed the title [-]Execute sorts in parallel[/-] [+]Execute sorts in parallel when limit is used after sort[/+] on Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions