anishshri-db commented on code in PR #45709:
URL: https://github.com/apache/spark/pull/45709#discussion_r1540146283
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/TransformWithStateExec.scala:
##########
@@ -160,26 +160,18 @@ case class TransformWithStateExec(
case ProcessingTime =>
assert(batchTimestampMs.isDefined)
val batchTimestamp = batchTimestampMs.get
- val procTimeIter = processorHandle.getExpiredTimers()
- procTimeIter.flatMap { case (keyObj, expiryTimestampMs) =>
- if (expiryTimestampMs < batchTimestamp) {
+ processorHandle.getExpiredTimers()
Review Comment:
We need to pass the expiry threshold right ?
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/TransformWithStateExec.scala:
##########
@@ -160,26 +160,18 @@ case class TransformWithStateExec(
case ProcessingTime =>
assert(batchTimestampMs.isDefined)
val batchTimestamp = batchTimestampMs.get
- val procTimeIter = processorHandle.getExpiredTimers()
- procTimeIter.flatMap { case (keyObj, expiryTimestampMs) =>
- if (expiryTimestampMs < batchTimestamp) {
+ processorHandle.getExpiredTimers()
+ .flatMap { case (keyObj, expiryTimestampMs) =>
handleTimerRows(keyObj, expiryTimestampMs, processorHandle)
- } else {
- Iterator.empty
}
- }
case EventTime =>
assert(eventTimeWatermarkForEviction.isDefined)
val watermark = eventTimeWatermarkForEviction.get
- val eventTimeIter = processorHandle.getExpiredTimers()
- eventTimeIter.flatMap { case (keyObj, expiryTimestampMs) =>
- if (expiryTimestampMs < watermark) {
+ processorHandle.getExpiredTimers()
Review Comment:
Same here ?
--
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]