Skip to content

Commit

Permalink
test: Fix explain with exteded info comet test
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuyukitanimura committed May 15, 2024
1 parent 5e05626 commit e844a0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,7 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
CometConf.COMET_EXEC_ENABLED.key -> "true",
CometConf.COMET_SHUFFLE_ENFORCE_MODE_ENABLED.key -> "true",
CometConf.COMET_EXEC_ALL_OPERATOR_ENABLED.key -> "true",
"spark.sql.extendedExplainProvider" -> "org.apache.comet.ExtendedExplainInfo") {
"spark.sql.extendedExplainProviders" -> "org.apache.comet.ExtendedExplainInfo") {
val table = "test"
withTable(table) {
sql(s"create table $table(c0 int, c1 int , c2 float) using parquet")
Expand Down
4 changes: 2 additions & 2 deletions spark/src/test/scala/org/apache/spark/sql/CometTestBase.scala
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ abstract class CometTestBase
var dfSpark: Dataset[Row] = null
withSQLConf(
CometConf.COMET_ENABLED.key -> "false",
"spark.sql.extendedExplainProvider" -> "") {
"spark.sql.extendedExplainProviders" -> "") {
dfSpark = Dataset.ofRows(spark, df.logicalPlan)
expected = dfSpark.collect()
}
Expand All @@ -259,7 +259,7 @@ abstract class CometTestBase
dfSpark.queryExecution.explainString(ExtendedMode),
dfComet.queryExecution.explainString(ExtendedMode))
if (supportsExtendedExplainInfo(dfSpark.queryExecution)) {
assert(diff.contains(expectedInfo))
assert(expectedInfo.exists(s => diff.contains(s)))
}
val extendedInfo =
new ExtendedExplainInfo().generateExtendedInfo(dfComet.queryExecution.executedPlan)
Expand Down

0 comments on commit e844a0e

Please sign in to comment.