ericm-db commented on code in PR #44961:
URL: https://github.com/apache/spark/pull/44961#discussion_r1473543276


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/StateStore.scala:
##########
@@ -121,6 +131,9 @@ trait StateStore extends ReadStateStore {
   def remove(key: UnsafeRow,
     colFamilyName: String = StateStore.DEFAULT_COL_FAMILY_NAME): Unit
 
+  def merge(key: UnsafeRow, value: UnsafeRow,
+            colFamilyName: String = StateStore.DEFAULT_COL_FAMILY_NAME): Unit

Review Comment:
   nit: indent



##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/StateStore.scala:
##########
@@ -67,6 +67,16 @@ trait ReadStateStore {
   def get(key: UnsafeRow,
     colFamilyName: String = StateStore.DEFAULT_COL_FAMILY_NAME): UnsafeRow
 
+  /**
+   * Provides an iterator containing all values for a particular key. The 
values are merged
+   * together and stored as a byte Array in the underlying state store. This 
operation relies
+   * on state store encoder to be able to split the single array into multiple 
values.
+   *
+   * Also see [[MultiValuedStateEncoder]] which supports encoding/decoding 
multiple values per key.
+   */
+  def valuesIterator(key: UnsafeRow,
+          colFamilyName: String = StateStore.DEFAULT_COL_FAMILY_NAME): 
Iterator[UnsafeRow]

Review Comment:
   nit: indent



-- 
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]

Reply via email to