Skip to content

DefaultPhysicalPlanner Generates Invalid Physical Plans #412

@tustvold

Description

@tustvold

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

#378 sought to loosen the requirement on SortExec to allow it to sort within multiple partitions, preserving the partitioning of the input. However, this broke the physical planner because it relies on the SortExec node to express that it only supports a single partition, so that the AddMergeExec optimisation pass inserts a MergeExec in front of it.

This isn't necessarily a problem as it currently isn't possible to create an ExecutionPlan without immediately optimising it, but it feels a little bit unusual.

Describe the solution you'd like

The PhysicalPlanner should be aware of the partitioning within the plan, and insert the MergeExec nodes, or otherwise, necessary for the plan to be correct.

Describe alternatives you've considered

The current head of #378 adds a constructor argument to SortExec to opt in to looser partitioning

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