viirya commented on a change in pull request #33846: URL: https://github.com/apache/spark/pull/33846#discussion_r696330040
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/TimeWindow.scala ########## @@ -27,6 +27,30 @@ import org.apache.spark.sql.catalyst.util.IntervalUtils import org.apache.spark.sql.errors.QueryCompilationErrors import org.apache.spark.sql.types._ +// scalastyle:off line.size.limit +@ExpressionDescription( + usage = """ + _FUNC_(time_column, window_duration, slide_duration, start_time) - Bucketize rows into one or more time windows given a timestamp specifying column. + Window starts are inclusive but the window ends are exclusive, e.g. 12:05 will be in the window [12:05,12:10) but not in [12:00,12:05). + Windows can support microsecond precision. Windows in the order of months are not supported. + See <a href="https://spark.apache.org/docs/latest/structured-streaming-programming-guide.html#window-operations-on-event-time">'Window Operations on Event Time'</a> in Structured Streaming guide doc for detailed explanation and examples. + """, + arguments = """ + Arguments: + * time_column - The column or the expression to use as the timestamp for windowing by time. The time column must be of TimestampType. + * window_duration - A string specifying the width of the window represented as "interval value". + (See <a href="https://spark.apache.org/docs/latest/sql-ref-literals.html#interval-literal">Interval Literal</a> for more details.) + Note that the duration is a fixed length of time, and does not vary over time according to a calendar. + * slide_duration - A string specifying the sliding interval of the window represented as "interval value". + A new window will be generated every `slideDuration`. Must be less than or equal to the `windowDuration`. Review comment: `slideDuration` or `slide_duration`? As in the expr doc we can only see `slide_duration`. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
