viirya commented on a change in pull request #35362:
URL: https://github.com/apache/spark/pull/35362#discussion_r801353720
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -3843,8 +3843,8 @@ object TimeWindowing extends Rule[LogicalPlan] {
* The windows are calculated as below:
* maxNumOverlapping <- ceil(windowDuration / slideDuration)
* for (i <- 0 until maxNumOverlapping)
- * windowId <- ceil((timestamp - startTime) / slideDuration)
- * windowStart <- windowId * slideDuration + (i - maxNumOverlapping) *
slideDuration + startTime
+ * lastStart <- timestamp - (timestamp - startTime + windowDuration) %
windowDuration
Review comment:
Hmm, I suppose this is the window start time of last window. Don't we
need to consider slide duration when calculating last start? I think this is
only correct if the slide duration equals to window duration.
--
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]