zhli1142015 commented on issue #8720:
URL: 
https://github.com/apache/incubator-gluten/issues/8720#issuecomment-2655493282

   `allowPrecisionLoss` is true in my test also.
   I think the issue here is the result scale is 22 but we truncate it to 18 
when dividing. You can see Spark use more bigger value as result scale and call 
`toPrecision` to the reqiured scale.
   
https://github.com/apache/spark/blob/97372e0381fce8f3b5d6f54756769c730acc2abe/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/decimalExpressions.scala#L283
   
https://github.com/apache/spark/blob/97372e0381fce8f3b5d6f54756769c730acc2abe/sql/api/src/main/scala/org/apache/spark/sql/types/Decimal.scala#L530C42-L530C67
   


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