Github user HyukjinKwon commented on a diff in the pull request: https://github.com/apache/spark/pull/20787#discussion_r185976200 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala --- @@ -887,11 +887,25 @@ object DateTimeUtils { * Returns number of months between time1 and time2. time1 and time2 are expressed in * microseconds since 1.1.1970. * - * If time1 and time2 having the same day of month, or both are the last day of month, - * it returns an integer (time under a day will be ignored). + * If time1 and time2 are on the same day of month, or both are the last day of month, + * time of a day will be ignored. + * + * Otherwise, the difference is calculated based on 31 days per month, and rounded to + * 8 digits. + */ + def monthsBetween(time1: SQLTimestamp, time2: SQLTimestamp): Double = { --- End diff -- From a very quick look. there was a mistake when merging it in. @aditkumar, mind if I ask to rebase and sync it please?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org