-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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-22916][SQL] shouldn't bias towards build right if user does not specify #20099
Conversation
Test build #85449 has finished for PR 20099 at commit
|
Test build #85458 has finished for PR 20099 at commit
|
Test build #85459 has finished for PR 20099 at commit
|
retest this please |
Test build #85471 has finished for PR 20099 at commit
|
} | ||
} | ||
|
||
private def needsBroadcastByHints(joinType: JoinType, left: LogicalPlan, right: LogicalPlan) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe using canBroadcastByHints
more consistent with the naming convention?
buildLeft || buildRight | ||
} | ||
|
||
private def broadcastSideByConfig(joinType: JoinType, left: LogicalPlan, right: LogicalPlan) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is is better to use xxxbySize
? byConfig
might confuse people.
Test build #85484 has finished for PR 20099 at commit
|
Test build #85486 has finished for PR 20099 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks! Merged to master. |
a late LGTM! |
What changes were proposed in this pull request?
When there are no broadcast hints, the current spark strategies will prefer to building the right side, without considering the sizes of the two tables. This patch added the logic to consider the sizes of the two tables for the build side. To make the logic clear, the build side is determined by two steps:
broadcastSideByHints
;broadcastSideBySizes
;How was this patch tested?
(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)
Please review http://spark.apache.org/contributing.html before opening a pull request.