Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12013#discussion_r57649905
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/HDFSBackedStateStoreProvider.scala
 ---
    @@ -94,15 +94,14 @@ private[state] class HDFSBackedStateStoreProvider(
     
         override def id: StateStoreId = HDFSBackedStateStoreProvider.this.id
     
    -    /**
    -     * Update the value of a key using the value generated by the update 
function.
    -     * @note Do not mutate the retrieved value row as it will unexpectedly 
affect the previous
    -     *       versions of the store data.
    -     */
    -    override def update(key: UnsafeRow, updateFunc: Option[UnsafeRow] => 
UnsafeRow): Unit = {
    -      verify(state == UPDATING, "Cannot update after already committed or 
cancelled")
    -      val oldValueOption = Option(mapToUpdate.get(key))
    -      val value = updateFunc(oldValueOption)
    +    override def get(key: UnsafeRow): Option[UnsafeRow] = {
    +      Option(mapToUpdate.get(key))
    +    }
    +
    +    override def put(key: UnsafeRow, value: UnsafeRow): Unit = {
    +      verify(state == UPDATING, "Cannot remove after already committed or 
cancelled")
    --- End diff --
    
    nit: remove -> put


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to