Skip to content

Convert sort to partial_sort when the table is unbounded #13807

Description

@berkaysynnada

Is your feature request related to a problem or challenge?

in fn replace_with_partial_sort, there is a check

        if !child.execution_mode().is_unbounded() {
            return Ok(plan);
        }

Isn't it better to have partial sorts even if the source is bounded?

Describe the solution you'd like

Remove this check and always convert sorts to partial sorts if the requirements and properties allow

Describe alternatives you've considered

No response

Additional context

I guess it would heavily depend on the way how the data is ordered, and what is the rest of the plan, but a few benchmark results perhaps will make it more clear

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