-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-32421][SQL] Add code-gen for shuffled hash join #29277
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
Changes from all commits
6fe1079
ab2e172
83e6a6f
b352035
43d286a
3e2406a
ac64864
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,7 +34,7 @@ import org.apache.spark.sql.catalyst.plans.physical.Partitioning | |
| import org.apache.spark.sql.catalyst.rules.Rule | ||
| import org.apache.spark.sql.execution.aggregate.HashAggregateExec | ||
| import org.apache.spark.sql.execution.columnar.InMemoryTableScanExec | ||
| import org.apache.spark.sql.execution.joins.{BroadcastHashJoinExec, SortMergeJoinExec} | ||
| import org.apache.spark.sql.execution.joins.{BroadcastHashJoinExec, ShuffledHashJoinExec, SortMergeJoinExec} | ||
| import org.apache.spark.sql.execution.metric.SQLMetrics | ||
| import org.apache.spark.sql.internal.SQLConf | ||
| import org.apache.spark.sql.types._ | ||
|
|
@@ -50,6 +50,7 @@ trait CodegenSupport extends SparkPlan { | |
| private def variablePrefix: String = this match { | ||
| case _: HashAggregateExec => "agg" | ||
| case _: BroadcastHashJoinExec => "bhj" | ||
| case _: ShuffledHashJoinExec => "shj" | ||
| case _: SortMergeJoinExec => "smj" | ||
| case _: RDDScanExec => "rdd" | ||
| case _: DataSourceScanExec => "scan" | ||
|
|
@@ -903,6 +904,10 @@ case class CollapseCodegenStages( | |
| // The children of SortMergeJoin should do codegen separately. | ||
| j.withNewChildren(j.children.map( | ||
| child => InputAdapter(insertWholeStageCodegen(child)))) | ||
| case j: ShuffledHashJoinExec => | ||
| // The children of ShuffledHashJoin should do codegen separately. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This and
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @viirya - sure, wondering what kind of wording you are expecting here? does it look better with: |
||
| j.withNewChildren(j.children.map( | ||
|
||
| child => InputAdapter(insertWholeStageCodegen(child)))) | ||
| case p => p.withNewChildren(p.children.map(insertInputAdapter)) | ||
| } | ||
| } | ||
|
|
||
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.
codegen children of
ShuffledHashJoinExecseparately same asSortMergeJoinExec.