MaxGekk commented on a change in pull request #26358: [SPARK-29712][SQL] Take 
into account the left bound in `fromDayTimeString()`
URL: https://github.com/apache/spark/pull/26358#discussion_r344800434
 
 

 ##########
 File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/IntervalUtilsSuite.scala
 ##########
 @@ -265,4 +267,30 @@ class IntervalUtilsSuite extends SparkFunSuite {
         assert(e.getMessage.contains("divide by zero"))
     }
   }
+
+  test("from bounded day-time string") {
+    val input = "5 12:40:30.999999999"
+
+    def check(from: IntervalUnit, to: IntervalUnit, expected: String): Unit = {
+      withClue(s"from = $from, to = $to") {
+        assert(fromDayTimeString(input, from, to) === fromString(expected))
+      }
+    }
+
+    withSQLConf(SQLConf.DIALECT.key -> "Spark") {
 
 Review comment:
   Do you mean if a string doesn't match to specified bounds like in 
`literals.sql`: 
https://github.com/apache/spark/pull/26358/files#diff-4f9e28af8e9fcb40a8a99b4e49f3b9b2R424
 ?
   

----------------------------------------------------------------
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]

Reply via email to