Skip to content

Commit

Permalink
Refine test
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed May 6, 2024
1 parent d62262a commit 4e4d528
Showing 1 changed file with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,21 @@ abstract class CometColumnarShuffleSuite extends CometTestBase with AdaptiveSpar
setupTestData()

test("Disable Comet shuffle with AQE coalesce partitions enabled") {
withSQLConf(
CometConf.COMET_EXEC_ENABLED.key -> "true",
SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> "true",
SQLConf.COALESCE_PARTITIONS_ENABLED.key -> "true",
SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "-1") {
val df = sql(
"SELECT * FROM (SELECT * FROM testData WHERE key = 0) t1 FULL JOIN " +
"testData2 t2 ON t1.key = t2.a")
checkShuffleAnswer(df, 0)
Seq(true, false).foreach { coalescePartitionsEnabled =>
withSQLConf(
CometConf.COMET_EXEC_ENABLED.key -> "true",
SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> "true",
SQLConf.COALESCE_PARTITIONS_ENABLED.key -> coalescePartitionsEnabled.toString,
SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "-1") {
val df = sql(
"SELECT * FROM (SELECT * FROM testData WHERE key = 0) t1 FULL JOIN " +
"testData2 t2 ON t1.key = t2.a")
if (coalescePartitionsEnabled) {
checkShuffleAnswer(df, 0)
} else {
checkShuffleAnswer(df, 2)
}
}
}
}

Expand Down

0 comments on commit 4e4d528

Please sign in to comment.