HyukjinKwon commented on a change in pull request #28821:
URL: https://github.com/apache/spark/pull/28821#discussion_r446017826
##########
File path: sql/core/src/test/resources/sql-tests/results/udf/udf-window.sql.out
##########
@@ -154,17 +154,17 @@ SELECT val_timestamp, udf(cate), avg(val_timestamp)
OVER(PARTITION BY udf(cate)
RANGE BETWEEN CURRENT ROW AND interval 23 days 4 hours FOLLOWING) FROM testData
ORDER BY udf(cate), val_timestamp
-- !query schema
-struct<val_timestamp:timestamp,CAST(udf(cast(cate as string)) AS
STRING):string,avg(CAST(val_timestamp AS DOUBLE)) OVER (PARTITION BY
CAST(udf(cast(cate as string)) AS STRING) ORDER BY val_timestamp ASC NULLS
FIRST RANGE BETWEEN CURRENT ROW AND INTERVAL '23 days 4 hours'
FOLLOWING):double>
+struct<val_timestamp:timestamp,CAST(udf(cast(cate as string)) AS
STRING):string,avg(val_timestamp) OVER (PARTITION BY CAST(udf(cast(cate as
string)) AS STRING) ORDER BY val_timestamp ASC NULLS FIRST RANGE BETWEEN
CURRENT ROW AND INTERVAL '23 days 4 hours' FOLLOWING):timestamp>
-- !query output
NULL NULL NULL
-2017-07-31 17:00:00 NULL 1.5015456E9
-2017-07-31 17:00:00 a 1.5016970666666667E9
-2017-07-31 17:00:00 a 1.5016970666666667E9
-2017-08-05 23:13:20 a 1.502E9
-2020-12-30 16:00:00 a 1.6093728E9
-2017-07-31 17:00:00 b 1.5022728E9
-2017-08-17 13:00:00 b 1.503E9
-2020-12-30 16:00:00 b 1.6093728E9
+2017-07-31 17:00:00 NULL 2017-07-31 17:00:00
+2017-07-31 17:00:00 a 2017-08-02 11:04:26.666666
+2017-07-31 17:00:00 a 2017-08-02 11:04:26.666666
+2017-08-05 23:13:20 a 2017-08-05 23:13:20
+2020-12-30 16:00:00 a 2020-12-30 16:00:00
+2017-07-31 17:00:00 b 2017-08-09 03:00:00
+2017-08-17 13:00:00 b 2017-08-17 13:00:00
+2020-12-30 16:00:00 b 2020-12-30 16:00:00
Review comment:
Hm .. so we allow timestamp types whereas other DBMSes disallow?
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]