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



##########
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:
       The ticket is opened for Spark 2.4 where it is correct date but your PR 
is for master 




----------------------------------------------------------------
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