MaxGekk commented on a change in pull request #25708: [SPARK-28141][SQL] 
Support special date values
URL: https://github.com/apache/spark/pull/25708#discussion_r322001930
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
 ##########
 @@ -848,4 +852,40 @@ object DateTimeUtils {
     val sinceEpoch = BigDecimal(timestamp) / MICROS_PER_SECOND + offset
     new Decimal().set(sinceEpoch, 20, 6)
   }
+
+  def currentDate(zoneId: ZoneId): SQLDate = 
localDateToDays(LocalDate.now(zoneId))
+
+  private val specialDate = 
"""(EPOCH|NOW|TODAY|TOMORROW|YESTERDAY)\p{Blank}*(.*)""".r
+  /**
 
 Review comment:
   Added and renamed `specialDate` to `specialValue` since it is applicable to 
other types as well

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to