You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/06/14 09:26:34 UTC
[GitHub] [spark] TJX2014 edited a comment on pull request #28819: [SPARK-31980][SQL]Function sequence() fails if start and end of range are equal dates
TJX2014 edited a comment on pull request #28819:
URL: https://github.com/apache/spark/pull/28819#issuecomment-643740231
> I think it matches the behaviour with Presto's (see #21155). Shall we check how it works in Presto?
Sure, we can get result from Presto(presto-server-0.236) as follows:
`
**presto> select sequence(date('2011-03-01'),date('2011-03-01'),interval '1' year);
_col0
[2011-03-01]
(1 row)**
Query 20200614_091013_00013_wnnjv, FINISHED, 1 node
Splits: 17 total, 17 done (100.00%)
0:00 [0 rows, 0B] [0 rows/s, 0B/s]
presto> select sequence(date('2011-03-01'),date('2012-03-01'),interval '1' year);
_col0
[2011-03-01, 2012-03-01]
(1 row)
Query 20200614_091017_00014_wnnjv, FINISHED, 1 node
Splits: 17 total, 17 done (100.00%)
0:00 [0 rows, 0B] [0 rows/s, 0B/s]
presto> select sequence(date('2011-03-01'),date('2010-03-01'),interval '1' year);
Query 20200614_091021_00015_wnnjv failed: sequence stop value should be greater than or equal to start value if step is greater than zero otherwise stop should be less than or equal to start
`
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org