Github user chenghao-intel commented on the pull request:
https://github.com/apache/spark/pull/8409#issuecomment-134491667
@davies When we performing an division for 2 decimals with type Decimal(38,
18), the result can be Decimal(77, 57), as @yhuai described above, this
probably causes problem when we try to get the `scale` value, if we try to
support the maximum value of a decimal, the best value for `scale` would be 0,
however, that's not what we want to for Decimal(1.234) / Decimal(1.235).
That's why I come with the idea to limit the maximum value for `scale` as
`18`. Not sure if you have any better idea.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]