beliefer commented on a change in pull request #32311:
URL: https://github.com/apache/spark/pull/32311#discussion_r619770377



##########
File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CollectionExpressionsSuite.scala
##########
@@ -934,12 +1071,25 @@ class CollectionExpressionsSuite extends SparkFunSuite 
with ExpressionEvalHelper
         EmptyRow,
         s"sequence boundaries: 0 to 2678400000000 by -${28 * MICROS_PER_DAY}")
 
+      checkExceptionInExpression[IllegalArgumentException](
+        new Sequence(
+          Literal(Date.valueOf("1970-01-01")),
+          Literal(Date.valueOf("1970-02-01")),
+          Literal(Period.ofMonths(-1))),
+        EmptyRow,
+        s"sequence boundaries: 0 to 2678400000000 by -${28 * MICROS_PER_DAY}")

Review comment:
       Good found.
   ~~It seems we should change the behavior of `CalenderInterval` so as it 
could avoid such assumption.~~
   ~~Or the assumption looks like is a bug for the `CalenderInterval`.~~
   ~~If so , could we fix the bug in another PR?~~




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