cloud-fan commented on a change in pull request #31789:
URL: https://github.com/apache/spark/pull/31789#discussion_r592106806
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ArithmeticExpressionSuite.scala
##########
@@ -576,4 +577,41 @@ class ArithmeticExpressionSuite extends SparkFunSuite with
ExpressionEvalHelper
}
}
}
+
+ test("SPARK-34677: exact add and subtract of day-time and year-month
intervals") {
+ checkExceptionInExpression[ArithmeticException](
+ UnaryMinus(Literal.create(Period.ofMonths(Int.MinValue),
YearMonthIntervalType)),
+ "overflow")
+ Seq(true, false).foreach { failOnError =>
Review comment:
`UnaryMinus` has the `failOnError` flag as well. Shall we move it inside
as well?
----------------------------------------------------------------
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]