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

    https://github.com/apache/spark/pull/16840#discussion_r99902500
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/Sink.scala ---
    @@ -31,8 +31,11 @@ trait Sink {
        * this method is called more than once with the same batchId (which 
will happen in the case of
        * failures), then `data` should only be added once.
        *
    -   * Note: You cannot apply any operators on `data` except consuming it 
(e.g., `collect/foreach`).
    +   * Note 1: You cannot apply any operators on `data` except consuming it 
(e.g., `collect/foreach`).
        * Otherwise, you may get a wrong result.
    +   *
    +   * Note 2: The method is supposed to be executed synchronously, i.e. the 
method should only return
    +   * after data is added to sink successfully.
    --- End diff --
    
    nit: data is added -> data is consumed. `add` may be not clear as you can 
also add `DataFrame` to a collection and do nothing.


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