cloud-fan commented on a change in pull request #26134: [SPARK-29486][SQL] CalendarInterval should have 3 fields: months, days and microseconds URL: https://github.com/apache/spark/pull/26134#discussion_r339665919
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/TimeWindow.scala ########## @@ -107,7 +108,7 @@ object TimeWindow { throw new IllegalArgumentException( s"Intervals greater than a month is not supported ($interval).") } - cal.microseconds + cal.days * CalendarInterval.MICROS_PER_DAY + cal.microseconds Review comment: here we use interval as a duration, and it's safe to use `1 day = 24 hours` (this is always true). ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org