TJX2014 commented on a change in pull request #28856: URL: https://github.com/apache/spark/pull/28856#discussion_r442557807
########## File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CollectionExpressionsSuite.scala ########## @@ -1836,4 +1836,16 @@ class CollectionExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper checkEvaluation(ArrayIntersect(empty, oneNull), Seq.empty) checkEvaluation(ArrayIntersect(oneNull, empty), Seq.empty) } + + test("SPARK-31982: sequence doesn't handle date increments that cross DST") { + Array("America/Chicago", "GMT", "Asia/Shanghai").foreach(tz => { + checkEvaluation(Sequence( + Cast(Literal("2011-03-01"), DateType), + Cast(Literal("2011-04-01"), DateType), + Option(Literal(stringToInterval("interval 1 month"))), + Option(tz)), + Seq( + Date.valueOf("2011-03-01"), Date.valueOf("2011-04-01"))) Review comment: Sure, the result could be `tz` independently. ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org