Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuyukitanimura committed May 16, 2024
1 parent e844a0e commit f5380e5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,6 @@ object ShimCometSparkSessionExtensions {
}
true
}

protected val EXTENDED_EXPLAIN_PROVIDERS_KEY = "spark.sql.extendedExplainProviders"
}
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.extendedExplainProviders" -> "org.apache.comet.ExtendedExplainInfo") {
EXTENDED_EXPLAIN_PROVIDERS_KEY -> "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.extendedExplainProviders" -> "") {
EXTENDED_EXPLAIN_PROVIDERS_KEY -> "") {
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(expectedInfo.exists(s => diff.contains(s)))
assert(expectedInfo.forall(s => diff.contains(s)))
}
val extendedInfo =
new ExtendedExplainInfo().generateExtendedInfo(dfComet.queryExecution.executedPlan)
Expand Down

0 comments on commit f5380e5

Please sign in to comment.