HyukjinKwon commented on a change in pull request #27046:
[SPARK-29348][SQL][FOLLOWUP] Add example of batch query for observable metrics
URL: https://github.com/apache/spark/pull/27046#discussion_r361898878
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
##########
@@ -1908,7 +1928,13 @@ class Dataset[T] private[sql](
* }
* }
* }
+ * def onQueryStarted(event: QueryStartedEvent): Unit = {}
+ * def onQueryTerminated(event: QueryTerminatedEvent): Unit = {}
* })
+ *
+ * // Observe row count (rc) and error row count (erc) in the streaming
Dataset
+ * val observed_ds = ds.observe("my_event", count(lit(1)).as("rc"),
count($"error").as("erc"))
+ * observed_ds.writeStream.format("...").start()
* }}}
*
* @group typedrel
Review comment:
Can we add `@Unstable` or `@DeveloperApi` while we're here? The usage with
`QueryExecutionListener` should be considered as one of both.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]