yaooqinn commented on a change in pull request #26314: [SPARK-29371][SQL] 
Support interval field values with fractional parts
URL: https://github.com/apache/spark/pull/26314#discussion_r340502820
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/IntervalUtils.scala
 ##########
 @@ -260,26 +260,50 @@ object IntervalUtils {
       try {
         units(i) match {
           case "year" =>
-            months = Math.addExact(months, Math.multiplyExact(values(i).toInt, 
12))
+            months = new BigDecimal(values(i)).multiply(new 
BigDecimal(MONTHS_PER_YEAR))
 
 Review comment:
   OK, I will fix the bug first, a followup for [SPARK-29532]? or do we need a 
jira to track?

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