Currently I have a stream which uses a sliding window, which can be reduced by pseudo code like this.
val df = stream.withColumn("processingTime", c