Skip to content

Integrate BatchCoalescer into HashJoinExec and remove from CoalesceBatches optimization rule #18781

Description

@alamb

Is your feature request related to a problem or challenge?

The LimitedBatchCoalescer can now be used to integrate batch coalescing directly in ExecutionPlan implementations, which is better than using an external operator for the reasons described on #18779

Currently HashJoinExec needs a CoalesceBatches operator after for performance, see

let wrap_in_coalesce = plan_any.downcast_ref::<HashJoinExec>().is_some()

We should integrate coalescing directly in the operator

Describe the solution you'd like

  1. Add batch coalescing into HashJoinExec
  2. Remove HashJoinExec from the CoalesceBatches optimizer rule:
    let wrap_in_coalesce = plan_any.downcast_ref::<HashJoinExec>().is_some()

Describe alternatives you've considered

@Dandandan did this for FilterExec in these two PRs, so we can probably follow a similar model

Additional context

No response

Activity

  1. added theissue type on Nov 17, 2025
  2. alamb commented on Nov 17, 2025

    @alamb
    ContributorAuthor

    FYI @gene-bordegaray this is one of the tickets I mentioned to you today

  3. gene-bordegaray commented on Nov 17, 2025

    @gene-bordegaray

    FYI @gene-bordegaray this is one of the tickets I mentioned to you today

    Ok great, I will spend some time reading up on the epic and see if I can pick up some of this work

  4. jonathanc-n commented on Nov 18, 2025

    @jonathanc-n
    Contributor

    @gene-bordegaray Is it fine if I take over this one? I'm quite interested in the hash join stuff. I believe the repartition operator should be somewhat similar to this if you are interested

  5. gene-bordegaray commented on Nov 18, 2025

    @gene-bordegaray

    @gene-bordegaray Is it fine if I take over this one? I'm quite interested in the hash join stuff. I believe the repartition operator should be somewhat similar to this if you are interested

    Yes yes, of course. I am just trying to learn so will be snooping 😅

  6. jonathanc-n commented on Nov 20, 2025

    @jonathanc-n
    Contributor

    take

  7. Dandandan commented on Nov 28, 2025

    @Dandandan
    Contributor

    FYI @jonathanc-n FYI I went ahead with it to do some performance experiments #18972

  8. jonathanc-n commented on Nov 28, 2025

    @jonathanc-n
    Contributor

    @Dandandan Sounds good, sorry about that. Been a bit busy lately

  9. added a commit that references this issue on Dec 8, 2025
    215cdff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions