Github user yucai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21009#discussion_r180472754
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
 ---
    @@ -426,15 +426,7 @@ case class DayOfMonth(child: Expression) extends 
UnaryExpression with ImplicitCa
       """,
       since = "2.3.0")
     // scalastyle:on line.size.limit
    -case class DayOfWeek(child: Expression) extends UnaryExpression with 
ImplicitCastInputTypes {
    -
    -  override def inputTypes: Seq[AbstractDataType] = Seq(DateType)
    -
    -  override def dataType: DataType = IntegerType
    -
    -  @transient private lazy val c = {
    -    Calendar.getInstance(DateTimeUtils.getTimeZone("UTC"))
    -  }
    +case class DayOfWeek(child: Expression) extends DayWeek {
    --- End diff --
    
    They are different, see:
    WeekDay: 0 = Monday, 1 = Tuesday, … 6 = Sunday
    DayOfWeek: 1 = Sunday, 2 = Monday, ..., 7 = Saturday


---

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

Reply via email to