You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/10/04 16:55:13 UTC

[GitHub] [spark] dongjoon-hyun commented on a change in pull request #25998: [SPARK-29328][SQL] Fix calculation of mean seconds per month

dongjoon-hyun commented on a change in pull request #25998: [SPARK-29328][SQL] Fix calculation of mean seconds per month
URL: https://github.com/apache/spark/pull/25998#discussion_r331595239
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/GroupStateImpl.scala
 ##########
 @@ -164,8 +164,7 @@ private[sql] class GroupStateImpl[S] private(
       throw new IllegalArgumentException(s"Provided duration ($duration) is not positive")
     }
 
-    val millisPerMonth = TimeUnit.MICROSECONDS.toMillis(CalendarInterval.MICROS_PER_DAY) * 31
-    cal.milliseconds + cal.months * millisPerMonth
+    cal.milliseconds + cal.months * MILLIS_PER_MONTH
 
 Review comment:
   It's interesting since this change doesn't affect our tests.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org