cloud-fan commented on a change in pull request #33889:
URL: https://github.com/apache/spark/pull/33889#discussion_r701063406
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/IntervalExpressionsSuite.scala
##########
@@ -412,15 +412,21 @@ class IntervalExpressionsSuite extends SparkFunSuite with
ExpressionEvalHelper {
}
Seq(
- (Period.ofMonths(1), 0) -> "/ by zero",
- (Period.ofMonths(Int.MinValue), 0d) -> "input is infinite or NaN",
+ (Period.ofMonths(1), 0) -> "divide by zero",
+ (Period.ofMonths(Int.MinValue), 0d) -> "divide by zero",
(Period.ofMonths(-100), Float.NaN) -> "input is infinite or NaN"
).foreach { case ((period, num), expectedErrMsg) =>
checkExceptionInExpression[ArithmeticException](
DivideYMInterval(Literal(period), Literal(num)),
expectedErrMsg)
}
+ withSQLConf(SQLConf.ANSI_ENABLED.key -> "true") {
Review comment:
interval divide does not depend on the ansi mode, we don't need to add a
UT for it.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]