dongjoon-hyun commented on a change in pull request #28248: [SPARK-31474][SQL]
Consistency between dayofweek/dow in extract exprsession and dayofweek function
URL: https://github.com/apache/spark/pull/28248#discussion_r410459896
##########
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 "DOW" | "DAYOFWEEK" => DayOfWeek(source)
Review comment:
It seems to be different from @cloud-fan 's request.
@cloud-fan . Could you confirm this?
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]