amaliujia commented on code in PR #40783:
URL: https://github.com/apache/spark/pull/40783#discussion_r1165922359


##########
connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/Dataset.scala:
##########
@@ -2935,6 +2936,16 @@ class Dataset[T] private[sql] (
     new DataFrameWriterV2[T](table, this)
   }
 
+  /**
+   * Interface for saving the content of the streaming Dataset out into 
external storage.
+   *
+   * @group basic
+   * @since 2.0.0

Review Comment:
   since 3.5.0



##########
connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/SparkSession.scala:
##########
@@ -287,6 +289,17 @@ class SparkSession private[sql] (
    */
   def read: DataFrameReader = new DataFrameReader(this)
 
+  /**
+   * Returns a `DataStreamReader` that can be used to read streaming data in 
as a `DataFrame`.
+   * {{{
+   *   sparkSession.readStream.parquet("/path/to/directory/of/parquet/files")
+   *   
sparkSession.readStream.schema(schema).json("/path/to/directory/of/json/files")
+   * }}}
+   *
+   * @since 2.0.0

Review Comment:
   dito



##########
connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/Dataset.scala:
##########
@@ -3017,8 +3028,39 @@ class Dataset[T] private[sql] (
         .getStorageLevel)
   }
 
+  /**
+   * 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:
+   * <ul>
+   *   <li>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.</li>
+   *   <li>To minimize the amount of state that we need to keep for on-going 
aggregations,
+   *    `mapGroupsWithState` and `dropDuplicates` operators.</li>
+   * </ul>
+   *  The current watermark is computed by looking at the `MAX(eventTime)` 
seen 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"). NOTE: This should 
not be negative.
+   *
+   * @group streaming
+   * @since 2.1.0

Review Comment:
   dito



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to