Skip to content

AQE: dynamically coalesce shuffle partitions based on runtime statistics #1987

Closed

Description

@andygrove

Is your feature request related to a problem or challenge?

The adaptive execution path currently does not dynamically coalesce shuffle partitions. When a shuffle stage produces very little data spread across many partitions, downstream stages still schedule one task per partition, adding scheduler overhead and small/empty tasks. This is the AQE analog of Spark's coalesce-shuffle-partitions (elastic shuffle parallelism).

Describe the solution you'd like

After a shuffle stage completes, use its per-partition output statistics to coalesce partitions in the downstream ShuffleReaderExec partitioning, reducing the number of tasks for the next stage. The EPIC design describes this under "Coalesce Shuffle Partitions (Elastic Shuffle Parallelism)".

Additional context

A coalesce module stub exists at ballista/scheduler/src/state/aqe/coalesce.rs but runtime coalescing is not yet wired in. Older closed issue #813 covered making the static shuffle partition count configurable, which is a different concern.

Context

This is one of the documented limitations of the experimental Adaptive Query Execution (AQE) path, listed in docs/source/user-guide/tuning-guide.md under "Current limitations" and in the doc comment on AdaptiveExecutionGraph (ballista/scheduler/src/state/aqe/mod.rs). Filing a discrete tracking issue so the gap is visible outside the doc.

Parent epic: #1359

Activity

  1. milenkovicm commented on Jul 11, 2026

    @milenkovicm
    Contributor

    @andygrove is this same or different from #1684 ?

  2. andygrove commented on Jul 11, 2026

    @andygrove
    MemberAuthor

    @andygrove is this same or different from #1684 ?

    Let me check. I created this issue because it was listed as a limitation in the documentation. Perhaps the docs are out of date.

  3. andygrove commented on Jul 11, 2026

    @andygrove
    MemberAuthor

    @andygrove is this same or different from #1684 ?

    Let me check. I created this issue because it was listed as a limitation in the documentation. Perhaps the docs are out of date.

    Yes, it's the same. I'll close this issue and update the docs.

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