MaxGekk commented on code in PR #48893:
URL: https://github.com/apache/spark/pull/48893#discussion_r1850002935
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/window/WindowEvaluatorFactoryBase.scala:
##########
@@ -101,6 +101,8 @@ trait WindowEvaluatorFactoryBase {
val boundExpr = (expr.dataType, boundOffset.dataType) match {
case (DateType, IntegerType) => DateAdd(expr, boundOffset)
case (DateType, _: YearMonthIntervalType) => DateAddYMInterval(expr,
boundOffset)
+ case (DateType, _: DayTimeIntervalType) =>
+ DateAdd(expr, ExtractANSIIntervalDays(boundOffset))
Review Comment:
Here @mihailom-db proposes to discard the time part at all, and get only
days, for example above:
```sql
> select date'now'+interval '1 10:11:12.123456' day to second;
2024-11-20
```
Probably, it is ok in this case. @mihailom-db Could you add more tests at
least for the cases:
```
| frameType=RANGE BETWEEN start=frameBound AND end=frameBound
| frameType=ROWS BETWEEN start=frameBound AND end=frameBound
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]