akshaytayal commented on code in PR #13519:
URL: https://github.com/apache/gluten/pull/13519#discussion_r4439475546
##########
gluten-substrait/src/main/scala/org/apache/spark/sql/execution/GlutenAutoAdjustStageResourceProfile.scala:
##########
@@ -241,11 +241,18 @@ object GlutenAutoAdjustStageResourceProfile extends
Logging {
SparkResourceUtil.getTaskSlots(sparkConf)
} else {
val coresPerExecutor =
rp.getExecutorCores.getOrElse(sparkConf.get(EXECUTOR_CORES))
- val coresPerTask = rp.getTaskCpus.getOrElse(sparkConf.get(CPUS_PER_TASK))
+ // Spark 4.3 allows fractional task cpus, so the profile and the config
report them as
+ // BigDecimal there and as Int before. Go through the string form so
both compile and the
+ // value stays exact.
+ val coresPerTask = BigDecimal(
+ rp.getTaskCpus.getOrElse(sparkConf.get(CPUS_PER_TASK)).toString)
Review Comment:
Fixed in #13518 (81eccab), which this PR includes.
Posted by an AI assistant. Flag anything wrong here.
--
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]