tdas 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_r301332530
##########
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:
Building on the comment I made in a different
[thread](https://github.com/apache/spark/pull/24996/files#r299514393), I agree
things were not very consistent. Since we are refactoring this, lets make sure
things move in the right direction and improve consistency. My opinion on where
we should ideally be is
- Minimize number of public classes that the user needs to know about. That
means that ideally there NOT should be multiple public classes and ways for
specifying a type of trigger. So there is should be only
`Trigger.ProcessingTime` and `ProcessingTimeTrigger` should be hidden.
- Classes that we dont want public visibility should not be visible in Java
as well. Making it `public[sql]` still keeps it visible as a top-level in Java
API docs. Either move the implementation inside the Trigger class, or move the
`ProcessingTimeTrigger` into `sql/execution` package which is explicitly hidden
from API docs.
My apologies for missing prior context and conversation. This is just my two
cents. I am sure I am probably missing some aspect of the conversation.
----------------------------------------------------------------
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]