Skip to content

Commit

Permalink
Add UT
Browse files Browse the repository at this point in the history
  • Loading branch information
acvictor committed Jun 12, 2024
1 parent 15571b8 commit 1e83dff
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,23 @@ class FallbackSuite extends VeloxWholeStageTransformerSuite with AdaptiveSparkPl
collect(plan) { case v: VeloxColumnarToRowExec => v }.size
}

test("fallback with shuffle manager") {
withSQLConf(GlutenConfig.COLUMNAR_SHUFFLE_ENABLED.key -> "false") {
runQueryAndCompare("select c1, count(*) from tmp1 group by c1") {
df =>
val plan = df.queryExecution.executedPlan
val columnarShuffle = find(plan) {
case _: ColumnarShuffledJoin => true
case _ => false
}
assert(columnarShuffle.isEmpty)

val wholeQueryColumnarToRow = collectColumnarToRow(plan)
assert(wholeQueryColumnarToRow == 2)
}
}
}

test("fallback with collect") {
withSQLConf(GlutenConfig.COLUMNAR_WHOLESTAGE_FALLBACK_THRESHOLD.key -> "1") {
runQueryAndCompare("SELECT count(*) FROM tmp1") {
Expand Down

0 comments on commit 1e83dff

Please sign in to comment.