srowen commented on a change in pull request #25421: [SPARK-28700][SQL] Use 
DECIMAL type for `sec` in `make_timestamp()`
URL: https://github.com/apache/spark/pull/25421#discussion_r313553791
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/types/Decimal.scala
 ##########
 @@ -388,10 +388,12 @@ final class Decimal extends Ordered[Decimal] with 
Serializable {
       Decimal(toBigDecimal - that.toBigDecimal)
     }
   }
+  def sub(that: Decimal): Decimal = this - that
 
   // TypeCoercion will take care of the precision, scale of result
   def * (that: Decimal): Decimal =
     Decimal(toJavaBigDecimal.multiply(that.toJavaBigDecimal, MATH_CONTEXT))
+  def mul(that: Decimal): Decimal = this * that
 
 Review comment:
   BTW I think you can call the existing operator with `.$times()` in Java code

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to