¿Qué hace el argumento 'startTime' de la función pyspark.sql.functions.window y window.start?

El ejemplo es el siguiente:

df=spark.createDataFrame([
    (1,"2017-05-15 23:12:26",2.5),
    (1,"2017-05-09 15:26:58",3.5),
    (1,"2017-05-18 15:26:58",3.6),
    (2,"2017-05-15 15:24:25",4.8),
    (3,"2017-05-25 15:14:12",4.6)],["index","time","val"]).orderBy("index","time")
df.collect()
+-----+-------------------+---+
|index|               time|val|
+-----+-------------------+---+
|    1|2017-05-09 15:26:58|3.5|
|    1|2017-05-15 23:12:26|2.5|
|    1|2017-05-18 15:26:58|3.6|
|    2|2017-05-15 15:24:25|4.8|
|    3|2017-05-25 15:14:12|4.6|
+-----+-------------------+---+

para la función "pyspark.sql.functions"

window(timeColumn, windowDuration, slideDuration=None, startTime=None)

timeColumn:The time column must be of TimestampType.

windowDuration:  Durations are provided as strings, e.g. '1 second', '1 day 12 hours', '2 minutes'. Valid
interval strings are 'week', 'day', 'hour', 'minute', 'second', 'millisecond', 'microsecond'.

slideDuration: If the 'slideDuration' is not provided, the windows will be tumbling windows.

startTime: the startTime is the offset with respect to 1970-01-01 00:00:00 UTC with which to start window intervals. For example, in order to have hourly tumbling windows that start 15 minutes past the hour, e.g. 12:15-13:15, 13:15-14:15... provide `startTime` as `15 minutes`.

Quiero contar los parámetros "val" en esta función por cada 5 días, y configuro el parámetro "slideDuration" como un valor de cadena con "5 días"

timeColumn="time",windowDuration="5 day",slideDuration="5 day"

los códigos de la siguiente manera:

df2=df.groupBy("index",F.window("time",windowDuration="5 day",slideDuration="5 day")).agg(F.sum("val").alias("sum_val"))

Cuando obtengo el valor del parámetro "window.start", el tiempo no comenzó con el tiempo mínimo que doy en la columna "tiempo" o el tiempo que he establecido antes, sino el otro tiempo desde ninguna parte.

Los resultados salieron de la siguiente manera:

+-----+---------------------+---------------------+-------+
|index|start                |end                  |sum_val|
+-----+---------------------+---------------------+-------+
|1    |2017-05-09 08:00:00.0|2017-05-14 08:00:00.0|3.5    |
|1    |2017-05-14 08:00:00.0|2017-05-19 08:00:00.0|6.1    |
|2    |2017-05-14 08:00:00.0|2017-05-19 08:00:00.0|4.8    |
|3    |2017-05-24 08:00:00.0|2017-05-29 08:00:00.0|4.6    |
+-----+---------------------+---------------------+-------+

Cuando configuro un valor para el parámetro "startTime" con '0 segundos' (los códigos son los siguientes):

df2=df.groupBy("index",F.window("time",windowDuration="5 day",slideDuration="5 day",startTime="0 second")).agg(F.sum("val").alias("sum_val"))
+-----+---------------------+---------------------+-------+
|index|start                |end                  |sum_val|
+-----+---------------------+---------------------+-------+
|1    |2017-05-09 08:00:00.0|2017-05-14 08:00:00.0|3.5    |
|1    |2017-05-14 08:00:00.0|2017-05-19 08:00:00.0|6.1    |
|2    |2017-05-14 08:00:00.0|2017-05-19 08:00:00.0|4.8    |
|3    |2017-05-24 08:00:00.0|2017-05-29 08:00:00.0|4.6    |
+-----+---------------------+---------------------+-------+

Los resultados salieron que todavía no comenzó con el tiempo mínimo en la columna "tiempo"

Entonces, ¿cómo debo hacer que esta función comience con el tiempo mínimo en la columna "tiempo", o el tiempo que configuré por primera vez, como "2017-05-09 15:25:30", estoy muy agradecido por usted para resolverme esta pregunta

La presentación oficial de 'startTime' de la siguiente manera

The startTime is the offset with respect to 1970-01-01 00:00:00 UTC with which to start window intervals. 
For example, in order to have hourly tumbling windows that start 15 minutes past the hour, e.g. 12:15-13:15, 13:15-14:15...
provide `startTime` as `15 minutes`.
Las referencias son las siguientes

1)¿Qué hace el argumento 'startTime' de la función 'pyspark.sql.functions.window'?

2)https://github.com/apache/spark/pull/12008

3)http://spark.apache.org/docs/latest/api/python/pyspark.sql.html?highlight=window#pyspark.sql.functions.window

Respuestas a la pregunta(1)

Su respuesta a la pregunta