tdas commented on a change in pull request #32938:
URL: https://github.com/apache/spark/pull/32938#discussion_r655745832
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/streaming/TestGroupState.scala
##########
@@ -0,0 +1,68 @@
+package org.apache.spark.sql.streaming
+
+import org.apache.spark.api.java.Optional
+import org.apache.spark.sql.execution.streaming.GroupStateImpl
+import org.apache.spark.sql.execution.streaming.GroupStateImpl._
+
+/**
+ * The extended version of [[GroupState]] interface with extra getters of
state machine fields
+ * to improve testability of the [[GroupState]] implementations
+ * which inherit from the extended interface.
+ *
+ * @tparam S User-defined type of the state to be stored for each group. Must
be encodable into
+ * Spark SQL types (see `Encoder` for more details).
+ */
+trait TestGroupState[S] extends GroupState[S] {
+ /** Whether the state has been marked for removing */
+ def hasRemoved: Boolean
Review comment:
I think isRemoved and isUpdated are better.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]