Github user davies commented on a diff in the pull request:
https://github.com/apache/spark/pull/7870#discussion_r36056616
--- 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 month).
*/
- def getMonth(date: Int): Int = {
+ def splitDate(date: Int): (Int, Int, Int, Int) = {
--- End diff --
Could you also post a benchmark to compare with using java.util.Date? Just
want to make sure we're doing the right things, also address the concern from
@srowen , thanks!
---
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]