spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srowen <>
Subject [GitHub] spark pull request: [SPARK-9541][SQL]DataTimeUtils cleanup
Date Mon, 03 Aug 2015 08:53:18 GMT
Github user srowen commented on a diff in the pull request:
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
    @@ -494,44 +494,54 @@ object DateTimeUtils {
    -   * Returns the month value for the given date. The date is expressed in days
    -   * since 1.1.1970. January is month 1.
    +   * Split date (expressed in days since 1.1.1970) into four fields:
    +   * year, month (Jan is Month 1), dayInMonth, daysToMonthEnd (0 if it's last day of
    -  def getMonth(date: Int): Int = {
    +  def splitDate(date: Int): (Int, Int, Int, Int) = {
    --- End diff --
    PS I'm also referring to the `java.util.time` package, aka the old Joda Time that's now
part of the JDK. This is the better API to use and thus to benchmark. It's not just about
speed, but correctness; there are plenty of bizarre corner cases to handle with dates of course

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message