cloud-fan commented on a change in pull request #28248:
URL: https://github.com/apache/spark/pull/28248#discussion_r411084360
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -2089,8 +2089,7 @@ object DatePart {
case "MONTH" | "MON" | "MONS" | "MONTHS" => Month(source)
case "WEEK" | "W" | "WEEKS" => WeekOfYear(source)
case "DAY" | "D" | "DAYS" => DayOfMonth(source)
- case "DAYOFWEEK" => DayOfWeek(source)
- case "DOW" => Subtract(DayOfWeek(source), Literal(1))
+ case "DAYOFWEEK" | "DOW" => DayOfWeek(source)
Review comment:
I said that the `DOW` behavior looks more reasonable, but unfortunately,
we already have `DAYOFWEEK` in Spark 2.4 and we can't change that. It's more
important to keep internal consistency.
----------------------------------------------------------------
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]