Github user marmbrus commented on a diff in the pull request:
https://github.com/apache/spark/pull/15954#discussion_r90084420
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/streaming/StreamingQueryListener.scala
---
@@ -81,30 +83,30 @@ object StreamingQueryListener {
/**
* :: Experimental ::
* Event representing the start of a query
- * @since 2.0.0
+ * @since 2.1.0
*/
@Experimental
- class QueryStartedEvent private[sql](val queryStatus:
StreamingQueryStatus) extends Event
+ class QueryStartedEvent private[sql](val id: UUID, val name: String)
extends Event
/**
* :: Experimental ::
- * Event representing any progress updates in a query
- * @since 2.0.0
+ * Event representing any progress updates in a query.
+ * @since 2.1.0
*/
@Experimental
- class QueryProgressEvent private[sql](val queryStatus:
StreamingQueryStatus) extends Event
+ class QueryProgressEvent private[sql](val progress:
StreamingQueryProgress) extends Event
/**
* :: Experimental ::
- * Event representing that termination of a query
+ * Event representing that termination of a query.
*
- * @param queryStatus Information about the status of the query.
- * @param exception The exception message of the [[StreamingQuery]] if
the query was terminated
+ * @param lastProgress The last progress the query made before it was
terminated.
+ * @param exception The exception message of the query if the query was
terminated
* with an exception. Otherwise, it will be `None`.
- * @since 2.0.0
+ * @since 2.1.0
*/
@Experimental
class QueryTerminatedEvent private[sql](
- val queryStatus: StreamingQueryStatus,
- val exception: Option[String]) extends Event
+ val lastProgress: StreamingQueryProgress,
--- End diff --
What is this if no progress is ever made? `null`? I would consider leaving
this just the `id`, because otherwise if the query dies before progress is
made, now you can't get the `id` at all.
---
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]