What needs to happen?
The Spark 4 Structured Streaming stateful ParDo filters late data against the watermark stored on the key's previous visit, so a key on its first visit or idle for several batches accepts data that a per batch bound would drop. Spark holds the per batch value as eventTimeWatermarkForLateEvents in TransformWithStateExec, but StatefulProcessor only sees the eviction watermark through TimerValues. Tighten the bound once Spark exposes the late events watermark, or by tracking the previous batch watermark outside keyed state.
Part of #36841.
Issue Priority
Priority: 3 (nice-to-have improvement)
Issue Components
What needs to happen?
The Spark 4 Structured Streaming stateful ParDo filters late data against the watermark stored on the key's previous visit, so a key on its first visit or idle for several batches accepts data that a per batch bound would drop. Spark holds the per batch value as
eventTimeWatermarkForLateEventsinTransformWithStateExec, butStatefulProcessoronly sees the eviction watermark throughTimerValues. Tighten the bound once Spark exposes the late events watermark, or by tracking the previous batch watermark outside keyed state.Part of #36841.
Issue Priority
Priority: 3 (nice-to-have improvement)
Issue Components