-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-34702][SQL] Avoid unnecessary code generation in JoinCodegenSupport.genBuildSideVars #31802
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 1 commit
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 |
|---|---|---|
|
|
@@ -103,7 +103,7 @@ class ExistenceJoinSuite extends SparkPlanTest with SharedSparkSession { | |
| ProjectExec(output, FilterExec(condition, join)) | ||
| } | ||
|
|
||
| test(s"$testName using ShuffledHashJoin") { | ||
| testWithWholeStageCodegenOnAndOff(s"$testName using ShuffledHashJoin") { _ => | ||
|
||
| extractJoinParts().foreach { case (_, leftKeys, rightKeys, boundCondition, _, _, _) => | ||
| withSQLConf(SQLConf.SHUFFLE_PARTITIONS.key -> "1") { | ||
| checkAnswer2(leftRows, rightRows, (left: SparkPlan, right: SparkPlan) => | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -153,7 +153,7 @@ class InnerJoinSuite extends SparkPlanTest with SharedSparkSession { | |
| } | ||
| } | ||
|
|
||
| test(s"$testName using ShuffledHashJoin (build=left)") { | ||
| testWithWholeStageCodegenOnAndOff(s"$testName using ShuffledHashJoin (build=left)") { _ => | ||
| extractJoinParts().foreach { case (_, leftKeys, rightKeys, boundCondition, _, _, _) => | ||
| withSQLConf(SQLConf.SHUFFLE_PARTITIONS.key -> "1") { | ||
| checkAnswer2(leftRows, rightRows, (leftPlan: SparkPlan, rightPlan: SparkPlan) => | ||
|
|
@@ -165,7 +165,7 @@ class InnerJoinSuite extends SparkPlanTest with SharedSparkSession { | |
| } | ||
| } | ||
|
|
||
| test(s"$testName using ShuffledHashJoin (build=right)") { | ||
| testWithWholeStageCodegenOnAndOff(s"$testName using ShuffledHashJoin (build=right)") { _ => | ||
| extractJoinParts().foreach { case (_, leftKeys, rightKeys, boundCondition, _, _, _) => | ||
| withSQLConf(SQLConf.SHUFFLE_PARTITIONS.key -> "1") { | ||
| checkAnswer2(leftRows, rightRows, (leftPlan: SparkPlan, rightPlan: SparkPlan) => | ||
|
|
@@ -198,7 +198,7 @@ class InnerJoinSuite extends SparkPlanTest with SharedSparkSession { | |
| } | ||
| } | ||
|
|
||
| test(s"$testName using BroadcastNestedLoopJoin build left") { | ||
| testWithWholeStageCodegenOnAndOff(s"$testName using BroadcastNestedLoopJoin build left") { _ => | ||
|
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.
|
||
| withSQLConf(SQLConf.SHUFFLE_PARTITIONS.key -> "1") { | ||
| checkAnswer2(leftRows, rightRows, (left: SparkPlan, right: SparkPlan) => | ||
| BroadcastNestedLoopJoinExec(left, right, BuildLeft, Inner, Some(condition())), | ||
|
|
@@ -207,7 +207,7 @@ class InnerJoinSuite extends SparkPlanTest with SharedSparkSession { | |
| } | ||
| } | ||
|
|
||
| test(s"$testName using BroadcastNestedLoopJoin build right") { | ||
| testWithWholeStageCodegenOnAndOff(s"$testName using BroadcastNestedLoopJoin build right") { _ => | ||
|
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. same reason as change above. |
||
| withSQLConf(SQLConf.SHUFFLE_PARTITIONS.key -> "1") { | ||
| checkAnswer2(leftRows, rightRows, (left: SparkPlan, right: SparkPlan) => | ||
| BroadcastNestedLoopJoinExec(left, right, BuildRight, Inner, Some(condition())), | ||
|
|
||
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.
This is just a minor fix packed in this PR.
HashJoinalready extendsJoinCodegenSupport. So we don't needCodegenSupporthere.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.
If you don't mind, could you make a separate PR? You can use
[MINOR]tag instead of creating a new JIRA.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.
@dongjoon-hyun - sure, will do it.