TJX2014 commented on a change in pull request #28856:
URL: https://github.com/apache/spark/pull/28856#discussion_r444858262



##########
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:
       presto> select sequence(date('2011-03-01'),date('2011-03-02'),interval 
'1' hour);
   Query 20200624_122744_00002_pehix failed: sequence step must be a day 
interval if start and end values are dates
   presto> select sequence(date('2011-03-01'),date('2011-03-02'),interval '1' 
day);
             _col0           
    [2011-03-01, 2011-03-02] 
   (1 row)
   Query 20200624_122757_00003_pehix, 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('2011-03-02'),interval '1' 
month);
       _col0     
    [2011-03-01] 
   (1 row)
   
   Query 20200624_122806_00004_pehix, 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('2011-03-02'),interval '1' 
year);
       _col0     
    [2011-03-01] 
   (1 row)
   Query 20200624_122810_00005_pehix, FINISHED, 1 node
   Splits: 17 total, 17 done (100.00%)
   0:00 [0 rows, 0B] [0 rows/s, 0B/s]




----------------------------------------------------------------
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]

Reply via email to