cloud-fan commented on a change in pull request #29635:
URL: https://github.com/apache/spark/pull/29635#discussion_r482926096
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/IntervalUtilsSuite.scala
##########
@@ -77,6 +77,19 @@ class IntervalUtilsSuite extends SparkFunSuite with
SQLHelper {
}
}
+ test("string to interval: interval with dangling parts should not results
null") {
+ checkFromInvalidString("+", "dangling interval value sign '+'")
+ checkFromInvalidString("-", "dangling interval value sign '-'")
+ checkFromInvalidString("+ 2", "dangling interval value '2'")
+ checkFromInvalidString("- 1", "dangling interval value '1'")
+ checkFromInvalidString("1", "dangling interval value '1'")
Review comment:
how about `Expect a unit after '1' but hit EOL`
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/IntervalUtilsSuite.scala
##########
@@ -77,6 +77,19 @@ class IntervalUtilsSuite extends SparkFunSuite with
SQLHelper {
}
}
+ test("string to interval: interval with dangling parts should not results
null") {
+ checkFromInvalidString("+", "dangling interval value sign '+'")
+ checkFromInvalidString("-", "dangling interval value sign '-'")
+ checkFromInvalidString("+ 2", "dangling interval value '2'")
+ checkFromInvalidString("- 1", "dangling interval value '1'")
+ checkFromInvalidString("1", "dangling interval value '1'")
Review comment:
how about `Expect a unit name after '1' but hit EOL`
----------------------------------------------------------------
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]