cloud-fan commented on a change in pull request #26151: [SPARK-29502][SQL]
typed interval expression should fail for invalid format
URL: https://github.com/apache/spark/pull/26151#discussion_r336539805
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/ExpressionParserSuite.scala
##########
@@ -435,8 +435,7 @@ class ExpressionParserSuite extends AnalysisTest {
val intervalLiteral = Literal(CalendarInterval.fromString("interval 3
month 1 hour"))
assertEqual("InterVal 'interval 3 month 1 hour'", intervalLiteral)
assertEqual("INTERVAL '3 month 1 hour'", intervalLiteral)
- assertEqual("Interval 'interval 3 monthsss 1 hoursss'",
- Literal(null, CalendarIntervalType))
+ intercept("Interval 'interval 3 monthsss 1 hoursss'")
Review comment:
This test suite defines the `intercept` method and uses it in many places. I
don't want to break the rule here. It's definitely better to update the
`intercept` method and take a error message parameter. This should be done in a
followup.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]