anishshri-db commented on code in PR #44961:
URL: https://github.com/apache/spark/pull/44961#discussion_r1475299901
##########
sql/api/src/main/scala/org/apache/spark/sql/streaming/StatefulProcessorHandle.scala:
##########
@@ -38,6 +38,18 @@ private[sql] trait StatefulProcessorHandle extends
Serializable {
*/
def getValueState[T](stateName: String): ValueState[T]
+ /**
+ * Creates new or returns existing list state associated with stateName.
+ * The ListState persists values of type T.
+ *
+ * @param stateName - name of the state variable
+ * @param keyEncoder - Spark SQL Encoder for key
+ * @tparam K - type of key
+ * @tparam T - type of state variable
+ * @return - instance of ListState of type T that can be used to store state
persistently
+ */
+ def getListState[K, T](stateName: String): ListState[T]
Review Comment:
Also don't need to pass key type now ?
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StatefulProcessorHandleImpl.scala:
##########
@@ -121,5 +121,14 @@ class StatefulProcessorHandleImpl(
resultState
}
+
override def getQueryInfo(): QueryInfo = currQueryInfo
+
+ override def getListState[K, T](stateName: String): ListState[T] = {
Review Comment:
Should we update to remove key type ?
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StatefulProcessorHandleImpl.scala:
##########
@@ -121,5 +121,14 @@ class StatefulProcessorHandleImpl(
resultState
}
+
Review Comment:
nit: extra newline ?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]