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

[FEA] Enable AQE autoBroadcastJoinThreshold configuration recommendation in Auto-tuner #719

Open
Tracked by #907
cindyyuanjiang opened this issue Jan 8, 2024 · 1 comment
Labels
core_tools Scope the core module (scala) feature request New feature or request

Comments

@cindyyuanjiang
Copy link
Collaborator

cindyyuanjiang commented Jan 8, 2024

Is your feature request related to a problem? Please describe.
Follow up issue for PR #688

We need to investigate further on spark.sql.adaptive.autoBroadcastJoinThreshold in order to make an accurate recommendation.

@cindyyuanjiang
Copy link
Collaborator Author

cindyyuanjiang commented Jan 8, 2024

Thanks @viadea for the comment:
"There are some hard rules we can consider when should we use BHJ (BroadcastHashJoin) vs SHJ (ShuffledHashJoin) in the GPU mode. Those hard rules can be implemented in our Profiling tool as well. For example:

  1. BHJ does not support full outer join. See https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala
  2. The maximum broadcast table should be smaller than 8G. See https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/BroadcastExchangeExec.scala.

As a result, we can check the join type and data size on the smaller side to determine if we should promote the BHJ or not by setting a larger spark.sql.adaptive.autoBroadcastJoinThreshold."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core_tools Scope the core module (scala) feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants