Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed May 5, 2024
1 parent 6174561 commit 80b3e67
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1357,8 +1357,10 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
assume(isSpark34Plus)
withSQLConf(
SQLConf.ANSI_ENABLED.key -> "false",
SQLConf.COALESCE_PARTITIONS_ENABLED.key -> "true",
CometConf.COMET_ENABLED.key -> "true",
CometConf.COMET_EXEC_ENABLED.key -> "true",
CometConf.COMET_SHUFFLE_ENFORCE_MODE_ENABLED.key -> "true",
CometConf.COMET_EXEC_ALL_EXPR_ENABLED.key -> "true",
CometConf.COMET_EXEC_ALL_OPERATOR_ENABLED.key -> "true",
"spark.sql.extendedExplainProvider" -> "org.apache.comet.ExtendedExplainInfo") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,11 +339,11 @@ class CometExecSuite extends CometTestBase {
}.map(_.metrics).get

assert(metrics.contains("input_batches"))
assert(metrics("input_batches").value == 2L)
assert(metrics("input_batches").value == 8L)
assert(metrics.contains("input_rows"))
assert(metrics("input_rows").value == 10L)
assert(metrics.contains("output_batches"))
assert(metrics("output_batches").value == 1L)
assert(metrics("output_batches").value == 4L)
assert(metrics.contains("output_rows"))
assert(metrics("output_rows").value == 5L)
assert(metrics.contains("peak_mem_used"))
Expand Down
2 changes: 2 additions & 0 deletions spark/src/test/scala/org/apache/spark/sql/CometTestBase.scala
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ abstract class CometTestBase
}
val extendedInfo =
new ExtendedExplainInfo().generateExtendedInfo(dfComet.queryExecution.executedPlan)
// scalastyle:off println
println(s"extendedInfo: $extendedInfo, expectedInfo: $expectedInfo")
assert(extendedInfo.equalsIgnoreCase(expectedInfo))
}

Expand Down

0 comments on commit 80b3e67

Please sign in to comment.