HyukjinKwon commented on a change in pull request #28443:
URL: https://github.com/apache/spark/pull/28443#discussion_r419182567



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
##########
@@ -205,6 +205,29 @@ object DateTimeUtils {
     (day.toInt, MICROSECONDS.toNanos(micros))
   }
 
+  /**
+   *Returns Gregorian days since epoch
+   */
+  def toGregorianDays(
+      year: Int,
+      month: Byte = 1,
+      day: Byte = 1,
+      hour: Byte = 0,
+      minute: Byte = 0,
+      sec: Byte = 0): SQLDate = {
+    val calendar = new GregorianCalendar(year, month - 1, day, hour, minute, 
sec)

Review comment:
       if we can land a minimised fix, let's go ahead for branch-2.4. 
Otherwise, I think I would rather treat that calendar switching supersedes it.




----------------------------------------------------------------
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:
[email protected]



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

Reply via email to