c21 commented on a change in pull request #32944:
URL: https://github.com/apache/spark/pull/32944#discussion_r663452659
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
##########
@@ -678,6 +678,15 @@ object SQLConf {
.booleanConf
.createWithDefault(true)
+ val ADAPTIVE_CUSTOM_COST_EVALUATOR_CLASS =
+ buildConf("spark.sql.adaptive.customCostEvaluatorClass")
+ .doc("The custom cost evaluator class to be used for adaptive execution.
If not being set," +
+ " Spark will use its own SimpleCostEvaluator by default.")
+ .version("3.2.0")
+ .internal()
Review comment:
@HyukjinKwon - I think it can be a non-internal one, updated.
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanExec.scala
##########
@@ -130,7 +130,11 @@ case class AdaptiveSparkPlanExec(
}
}
- @transient private val costEvaluator = SimpleCostEvaluator
+ @transient private val costEvaluator =
+ conf.getConf(SQLConf.ADAPTIVE_CUSTOM_COST_EVALUATOR_CLASS) match {
Review comment:
Sounds good, updated with `@Unstable` and added a note comment for class
`Cost` and `CostEvaluator`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]