Skip to content

Commit 33bfdcb

Browse files
committed
Improved docs
1 parent e1f25b6 commit 33bfdcb

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

sql/core/src/main/scala/org/apache/spark/sql/streaming/GroupState.scala

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,14 @@ import org.apache.spark.sql.catalyst.plans.logical.LogicalGroupState
4949
* no effect.
5050
*
5151
* The major difference between `mapGroupsWithState` and `flatMapGroupsWithState` is that the
52-
* former allows the function to return one and only one record, where as the latter is more
53-
* allows the function to return any number of records (including zero). Furthermore, the
54-
* `flatMapGroupsWithState` is associated with a operation output mode, which can be either
52+
* former allows the function to return one and only one record, whereas the latter
53+
* allows the function to return any number of records (including no records). Furthermore, the
54+
* `flatMapGroupsWithState` is associated with an operation output mode, which can be either
5555
* `Append` or `Update`. Semantically, this defines whether the output records of one trigger
5656
* is effectively replacing the previously output records (from previous triggers) or is appending
57-
* to the list of previously output records. Essentially, this defines how the semantic result table
58-
* is updated, and will allow you to reason about the semantics of later operations.
57+
* to the list of previously output records. Essentially, this defines how the semantic Result Table
58+
* (refer to programming guide) is updated, and allows us to reason about the semantics of
59+
* later operations.
5960
*
6061
* Important points to note about the function (both mapGroupsWithState and flatMapGroupsWithState).
6162
* - In a trigger, the function will be called only the groups present in the batch. So do not

0 commit comments

Comments
 (0)