cloud-fan 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_r344832563
##########
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:
yea, like what Oracle does.
----------------------------------------------------------------
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]