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

    https://github.com/apache/spark/pull/15702#discussion_r86203412
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -536,6 +535,41 @@ class Dataset[T] private[sql](
       }
     
       /**
    +   * :: Experimental ::
    +   * Defines an event time watermark for this [[Dataset]]. A watermark 
tracks a point in time
    +   * before which we assume no more late data is going to arrive.
    +   *
    +   * Spark will use this watermark for several purposes:
    +   *  - To know when a given time window aggregation can be finalized and 
thus can be emitted when
    +   *    using output modes that do not allow updates.
    +   *  - To minimize the amount of state that we need to keep for on-going 
aggregations.
    +   *
    +   *  The current event time is computed by looking at the 
`MAX(eventTime)` seen in an epoch across
    +   *  all of the partitions in the query minus a user specified 
`delayThreshold`.  Due to the cost
    +   *  of coordinating this value across partitions, the actual watermark 
used is only guaranteed
    +   *  to be at least `delayThreshold` behind the actual event time.  In 
some cases we may still
    +   *  process records that arrive more than `delayThreshold` late.
    +   *
    +   * @param eventTime the name of the column that contains the event time 
of the row.
    +   * @param delayThreshold the minimum delay to wait to data to arrive 
late, relative to the latest
    +   *                       record that has been processed in the form of 
an interval
    +   *                       (e.g. "1 minute" or "5 hours").
    --- End diff --
    
    That seems like more of an implementation detail, rather than a contract of 
the API.  The real contract is stated above as `the actual watermark used is 
only guaranteed to be at least 'delayThreshold' behind the actual event time`.  
There aren't really any bounds we can promise without knowing more about the 
query (even ms).


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