Github user dongjoon-hyun commented on a diff in the pull request:
https://github.com/apache/spark/pull/21196#discussion_r185114200
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
---
@@ -45,6 +45,7 @@ object DateTimeUtils {
// it's 2440587.5, rounding up to compatible with Hive
final val JULIAN_DAY_OF_EPOCH = 2440588
final val SECONDS_PER_DAY = 60 * 60 * 24L
+ final val SECONDS_PER_MONTH = 60 * 60 * 24 * 31D
--- End diff --
Nit, but both Spark and Hive avoid declaring it as a variable (maybe due to
the same reason) and mentioned that in the comments only.
-
https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMonthsBetween.java#L140
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]