Github user davies commented on a diff in the pull request:
https://github.com/apache/spark/pull/6814#discussion_r32764893
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/types/Decimal.scala ---
@@ -261,7 +261,7 @@ final class Decimal extends Ordered[Decimal] with
Serializable {
def - (that: Decimal): Decimal = Decimal(toBigDecimal -
that.toBigDecimal)
- def * (that: Decimal): Decimal = Decimal(toBigDecimal *
that.toBigDecimal)
+ def * (that: Decimal): Decimal =
Decimal(toJavaBigDecimal.multiply(that.toJavaBigDecimal))
--- End diff --
This is kind of workaround, didn't fix the root cause.
The root cause should be in `toBigDecimal`, which doesn't carry on the
information about precision to BigDecimal. Could you fix that?
---
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]