TJX2014 commented on a change in pull request #28856:
URL: https://github.com/apache/spark/pull/28856#discussion_r444045788
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala
##########
@@ -2589,6 +2589,8 @@ object Sequence {
}
}
+ // To generate time sequences, we use scale 1 in TemporalSequenceImpl
+ // for `TimestampType`, while MICROS_PER_DAY for `DateType`
Review comment:
Yes, we can, but the result seems a little strangeļ¼
`scala> sql("select explode(sequence(cast('2011-03-01' as date),
cast('2011-05-01' as date), interval 1 hour))").count
res19: Long = 1465
scala> sql("select explode(sequence(cast('2011-03-01' as date),
cast('2011-05-01' as date), interval 1 minute))").count
res20: Long = 87841
scala> sql("select explode(sequence(cast('2011-03-01' as date),
cast('2011-05-01' as date), interval 1 second))").count
res21: Long = 5270401`
----------------------------------------------------------------
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]