tgravescs commented on PR #45157:
URL: https://github.com/apache/spark/pull/45157#issuecomment-1954881564

   Sorry, I'm not following what this pr changes from the previous 
implementation.  the method toInternalResource handles 1.0/9.0 as well, 
correct?  That is perhaps what I'm missing, what case does that not work for.. 
maybe 1/9.0 works out but you are saying others won't?
   
   say 1/9.0 comes out a big bigger like 0.111111111111111112:
   ```
   scala> toInternalResource(0.111111111111111112)
   res17: Long = 1111111111111111
   ```
   
   In this pr, the key line seems to be (the round down):
   > var taskAmount = 
BigDecimal(taskReqs.amount).setScale(ResourceAmountUtils.SCALE, 
RoundingMode.DOWN)
   
   but as we have discussed the api takes the double so if someone is 
programmatically passing something in its going to be computed on their side 
not by Spark.


-- 
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]

Reply via email to