You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/09/03 14:53:24 UTC

[GitHub] [spark] yaooqinn commented on a change in pull request #29635: [SPARK-32785][SQL] Interval with dangling parts should not results null

yaooqinn commented on a change in pull request #29635:
URL: https://github.com/apache/spark/pull/29635#discussion_r483040796



##########
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:
       done, but looks a bit weird for `interval '-.'` to expect a unit name




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org