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

    https://github.com/apache/spark/pull/17179#discussion_r106566062
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/KeyValueGroupedDataset.scala ---
    @@ -249,6 +250,43 @@ class KeyValueGroupedDataset[K, V] private[sql](
             dataAttributes,
             OutputMode.Update,
             isMapGroupsWithState = true,
    +        KeyedStateTimeout.none,
    +        child = logicalPlan))
    +  }
    +
    +  /**
    +   * ::Experimental::
    +   * (Scala-specific)
    +   * Applies the given function to each group of data, while maintaining a 
user-defined per-group
    +   * state. The result Dataset will represent the objects returned by the 
function.
    +   * For a static batch Dataset, the function will be invoked once per 
group. For a streaming
    +   * Dataset, the function will be invoked for each group repeatedly in 
every trigger, and
    +   * updates to each group's state will be saved across invocations.
    +   * See [[org.apache.spark.sql.streaming.KeyedState]] for more details.
    +   *
    +   * @tparam S The type of the user-defined state. Must be encodable to 
Spark SQL types.
    +   * @tparam U The type of the output objects. Must be encodable to Spark 
SQL types.
    +   * @param func Function to be called on every group.
    +   * @param timeout Timeout information for groups that do not receive 
data for a while
    --- End diff --
    
    added to the main explanation in KeyedState


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to