Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18814#discussion_r131595661
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/window/WindowExec.scala 
---
    @@ -139,7 +141,12 @@ case class WindowExec(
             }
     
             // Create the projection which returns the current 'value' 
modified by adding the offset.
    -        val boundExpr = Add(expr, Cast(boundOffset, expr.dataType))
    +        val boundExpr = (expr.dataType, boundOffset.dataType) match {
    +          case (DateType, IntegerType) => DateAdd(expr, boundOffset)
    +          case (TimestampType, CalendarIntervalType) =>
    +            TimeAdd(expr, boundOffset, 
Some(DateTimeUtils.defaultTimeZone.getID))
    --- End diff --
    
    shall we use session timezone here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to