Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7754#discussion_r35822213
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
 ---
    @@ -575,6 +576,138 @@ object DateTimeUtils {
       }
     
       /**
    +   * The number of days for each month (not leap year)
    +   */
    +  private val monthDays = Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 
30, 31)
    +
    +  /**
    +   * Returns the date value for the first day of the given month.
    +   * The month is expressed in months since year zero (17999 BC), starting 
from 0.
    +   */
    +  private def firstDayOfMonth(absoluteMonth: Int): Int = {
    --- End diff --
    
    we don't need to do this one now, but this is really one function that 
would be great to use type aliases.
    
    e.g.
    Timestamp = long
    Date = int
    
    then a lot of the code would be much more clear (we need to figure out a 
good name since timestamp/date is already in the java package


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to