Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-51203][SQL] Enhance force optimize skewed join #49936

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wForget
Copy link
Member

@wForget wForget commented Feb 13, 2025

What changes were proposed in this pull request?

Why are the changes needed?

ForceOptimizeSkewedJoin allows optimizing skewed join even if
introduce extra shuffle, but currently it only works for aggregation after join, not for aggregations in children of join. Like:

HashAggregate
     |
  Exchange 
     |
HashAggregate     Exchange (skewed side)
     |               |
   Sort            Sort
     \               /
       SortMergeJoin

I want to introduce extra shuffle for join child so as to optimize skewed join when forceOptimizeSkewedJoin is enabled? Like:

  HashAggregate
       |
    Exchange 
       |
  HashAggregate     
       |
    Exchange
(froce extra shuffle)       Exchange (skewed side)
       |                       |
     Sort                     Sort
       \                      /
      SortMergeJoin(isSkewJoin = true) 

Does this PR introduce any user-facing change?

How was this patch tested?

added unit test

Was this patch authored or co-authored using generative AI tooling?

No

@github-actions github-actions bot added the SQL label Feb 13, 2025
@wForget wForget changed the title [SPARK-51203] Enhance force optimize skewed join [SPARK-51203][SQL] Enhance force optimize skewed join Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant