Skip to content

Commit

Permalink
Addressing the Spark change of renaming the named parameter (#10992)
Browse files Browse the repository at this point in the history
Signed-off-by: Raza Jafri <rjafri@nvidia.com>
  • Loading branch information
razajafri authored Jun 8, 2024
1 parent 18c2579 commit 9030b13
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,24 +65,27 @@ class GpuInSubqueryExecSuite extends SparkQueryCompareTestSuite {

private def buildCpuInSubqueryPlan(
spark: SparkSession,
shouldBroadcast: Boolean): SparkPlan = {
shouldBroadcastOrDpp: Boolean): SparkPlan = {
val df1ReadExec = readToPhysicalPlan(nullableStringsIntsDf(spark))
val df2ReadExec = readToPhysicalPlan(subqueryTable(spark))
val inSubquery = InSubqueryExec(
df1ReadExec.output.head,
SubqueryExec("sbe",
ProjectExec(Seq(df2ReadExec.output.head), df2ReadExec)),
ExprId(7),
shouldBroadcast=shouldBroadcast)
shouldBroadcastOrDpp)
FilterExec(DynamicPruningExpression(inSubquery), df1ReadExec)
}

for (shouldBroadcast <- Seq(false, true)) {
test(s"InSubqueryExec shouldBroadcast=$shouldBroadcast") {
/**
* The named parameter shouldBroadcast was renamed to isDynamicPruning in Spark 4.0.0+
*/
for (shouldBroadcastOrDpp <- Seq(false, true)) {
test(s"InSubqueryExec shouldBroadcastOrDpp=$shouldBroadcastOrDpp") {
val gpuResults = withGpuSparkSession({ spark =>
val overrides = new GpuOverrides()
val transitionOverrides = new GpuTransitionOverrides()
val cpuPlan = buildCpuInSubqueryPlan(spark, shouldBroadcast)
val cpuPlan = buildCpuInSubqueryPlan(spark, shouldBroadcastOrDpp)
val gpuPlan = transitionOverrides(overrides(cpuPlan))
gpuPlan.execute().collect()
})
Expand Down

0 comments on commit 9030b13

Please sign in to comment.