Skip to content

Use range transformation information to avoid aggregate repartitioning #25345

Closed

Description

@benbellick

Is your feature request related to a problem or challenge?

Grouped aggregation currently inserts a hash RepartitionExec when grouping by date_bin or date_trunc over a range-partitioned input, even when the existing partitioning keeps each group local to one input partition.

#25344 establishes how functions expose that they support range-partitioning analysis, but the partition-satisfaction and aggregation-planning logic must use that information before the unnecessary repartition can be removed.

Describe the solution you'd like

Use the range-transformation information exposed by #25344 to determine when the existing range partitioning keeps each group local to one input partition.

When that guarantee holds, allow grouped aggregation to use the existing range partitioning instead of inserting a hash RepartitionExec.

Grouped aggregation will be the first consumer, but the underlying range information should remain usable by other operators in future work.

Additional context

Part of #23569. Depends on #25344.

Activity

  1. benbellick commented on Sep 15, 2026

    @benbellick
    ContributorAuthor

    take

  2. benbellick commented on Sep 19, 2026

    @benbellick
    ContributorAuthor

    For the initial implementation I'll start with single-key range partitioning. It shouldn't be hard to add compound range keys, but I want to minimize what will probably be a fairly large PR.

  3. added a commit that references this issue on Oct 31, 2026
    f1ecc4a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions