Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/19239#discussion_r139025814
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StreamExecution.scala
---
@@ -130,6 +130,13 @@ class StreamExecution(
protected var offsetSeqMetadata = OffsetSeqMetadata(
batchWatermarkMs = 0, batchTimestampMs = 0, sparkSession.conf)
+ /**
+ * A map from watermarked attributes to their current watermark. The
minimum watermark
+ * timestamp present here will be used as the overall query watermark in
offsetSeqMetadata;
+ * the query watermark is what's logged and used to age out old state.
+ */
+ protected var attributeWatermarkMsMap: AttributeMap[Long] =
AttributeMap(Seq())
--- End diff --
this is needed only inside a single function right? so make it a local
variable.
even better, if you dont have to make it a var, make it a val in the usual
functional way.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]