jingz-db commented on code in PR #49488: URL: https://github.com/apache/spark/pull/49488#discussion_r1950020450
########## sql/api/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/TimeMode.scala: ########## @@ -28,10 +28,17 @@ case object ProcessingTime extends TimeMode case object EventTime extends TimeMode +/** + * Restore time mode used in transformWithState from string. Used for client/server side + * communication. Set isScala = true if you are using this for scala spark connect. Set isScala = + * false if you are using this for communication between Py4j and Scala driver. + */ object TimeModes { - def apply(timeMode: String): TimeMode = { + def apply(timeMode: String, isScala: Boolean = false): TimeMode = { Review Comment: There is a naming difference between case class for [Notime](https://github.com/apache/spark/blob/master/sql/api/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/TimeMode.scala#L25) and the public facing API of [TimeMode.None() ](https://github.com/apache/spark/blob/master/sql/api/src/main/java/org/apache/spark/sql/streaming/TimeMode.java#L35)in Scala. For Python, we are accepting timemode as string and it is already rolled out as "None". As both changes are already rolled out and I am hesitate to change the existing codes. If not changing the existing code, a naming mapping would be needed. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org