You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "anishshri-db (via GitHub)" <gi...@apache.org> on 2024/04/01 17:46:15 UTC
Re: [PR] [SPARK-47558][SS] State TTL support for ValueState [spark]
anishshri-db commented on code in PR #45674:
URL: https://github.com/apache/spark/pull/45674#discussion_r1546640629
##########
sql/api/src/main/scala/org/apache/spark/sql/streaming/ValueState.scala:
##########
@@ -42,8 +43,22 @@ private[sql] trait ValueState[S] extends Serializable {
/** Get the state if it exists as an option and None otherwise */
def getOption(): Option[S]
- /** Update the value of the state. */
- def update(newState: S): Unit
+ /**
+ * Update the value of the state.
+ * @param newState the new value
+ * @param ttlDuration set the ttl to current batch processing time
+ * (for processing time TTL mode) plus ttlDuration
Review Comment:
Should we note whether we throw an exception for event time based TTL mode here ? i.e. explicitly note that only processing time TTL mode is supported for this API ?
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org