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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]