Skip to content

CoalesceBatches physical optimizer rule says it should be last but it isn't #18148

Closed as not planned

Description

@Jefffrey

// The CoalesceBatches rule will not influence the distribution and ordering of the
// whole plan tree. Therefore, to avoid influencing other rules, it should run last.
Arc::new(CoalesceBatches::new()),
Arc::new(CoalesceAsyncExecInput::new()),
// Remove the ancillary output requirement operator since we are done with the planning
// phase.
Arc::new(OutputRequirements::new_remove_mode()),

Can see here it states CoalesceBatches rule should be last but seems this isn't the case anymore; either comment is outdated and it doesn't need to be last anymore, or we should in-fact move it down to respect the comment.

Activity

  1. Jefffrey commented on Oct 18, 2025

    @Jefffrey
    ContributorAuthor

    Side note: it would be nice to add the comment for CoalesceAsyncExecInput too, to be consistent with how it's done for other rules. Something like:

    // Coalesce in order to reduce number of async function invocations for efficiency.
  2. alamb commented on Nov 17, 2025

    @alamb
    Contributor

    FWIW I am working to organize some work to remove this execution plan entirely:

  3. alamb commented on Jan 6, 2026

    @alamb
    Contributor

    The rule was removed in

    So I think this issue is now obselete

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions