HeartSaVioR commented on a change in pull request #24996: [SPARK-28199][SS]
Replace deprecated ProcessingTime with ProcessingTimeTrigger and make invisible
to end users
URL: https://github.com/apache/spark/pull/24996#discussion_r301664403
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/Triggers.scala
##########
@@ -27,3 +32,34 @@ import org.apache.spark.sql.streaming.Trigger
@Experimental
@Evolving
case object OneTimeTrigger extends Trigger
+
+/**
+ * A [[Trigger]] that runs a query periodically based on the processing time.
If `interval` is 0,
+ * the query will run as fast as possible.
+ */
+@Evolving
+private[sql] case class ProcessingTimeTrigger(intervalMs: Long) extends
Trigger {
Review comment:
Sorry I guess I mixed up. My bad, not moving OneTimeTrigger but moving
ContinuousTrigger. Let me enumerate necessary changes from what I understand:
* `OneTimeTrigger` is already in `Triggers.scala` but it's open to `public`,
so need to add deprecation and plan to hide it.
* I guess adding `private[sql]` would work since Triggers.scala is already
in `sql.execution.streaming` package. Not sure exact package of `sql.execution`
will be hidden.
* Otherwise we can add replacement as same as what we do for
ProcessingTime, but requires bigger changeset.
* Move `ContinuousTrigger` to `Triggers.scala` with `private[sql]` scope,
and deprecate origin.
I guess both moving and deprecating make the changeset looking verbose, but
I guess even in major release we may not want to remove public classes which
haven't been deprecated.
I guess my commit
(https://github.com/HeartSaVioR/spark/commit/f8488cfb0a045806e125215b933fc10931b1b431)
mentioned above already covered it, so please take a look at the commit. If we
are OK to go or would like to continue reviewing under the commit, I'll add the
commit to the PR.
----------------------------------------------------------------
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]