Skip to content

Commit 0e16591

Browse files
committed
Fix unit test in AdaptiveQueryExecSuite
1 parent f77e684 commit 0e16591

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ class AdaptiveQueryExecSuite
226226
val df1 = spark.range(10).withColumn("a", 'id)
227227
val df2 = spark.range(10).withColumn("b", 'id)
228228
withSQLConf(SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "-1") {
229-
val testDf = df1.where('a > 10).join(df2.where('b > 10), "id").groupBy('a).count()
229+
val testDf = df1.where('a > 10).join(df2.where('b > 10), Seq("id"), "left_outer")
230+
.groupBy('a).count()
230231
checkAnswer(testDf, Seq())
231232
val plan = testDf.queryExecution.executedPlan
232233
assert(find(plan)(_.isInstanceOf[SortMergeJoinExec]).isDefined)
@@ -238,7 +239,8 @@ class AdaptiveQueryExecSuite
238239
}
239240

240241
withSQLConf(SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "1") {
241-
val testDf = df1.where('a > 10).join(df2.where('b > 10), "id").groupBy('a).count()
242+
val testDf = df1.where('a > 10).join(df2.where('b > 10), Seq("id"), "left_outer")
243+
.groupBy('a).count()
242244
checkAnswer(testDf, Seq())
243245
val plan = testDf.queryExecution.executedPlan
244246
assert(find(plan)(_.isInstanceOf[BroadcastHashJoinExec]).isDefined)

0 commit comments

Comments
 (0)