Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/19239#discussion_r139034057
--- 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 --
I see. I was mistaken. However in that case, use a mutable.HashMap instead
of var. That the code style we use with scala is not to use vars unless
absolutely needed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]