cloud-fan commented on a change in pull request #26815: [SPARK-30189][SQL]
Interval from year-month/date-time string should handle whitespaces
URL: https://github.com/apache/spark/pull/26815#discussion_r390152216
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/IntervalUtilsSuite.scala
##########
@@ -312,6 +321,11 @@ class IntervalUtilsSuite extends SparkFunSuite with
SQLHelper {
checkFail("5 30:12:20", DAY, SECOND, "hour 30 outside range")
checkFail("5 30-12", DAY, SECOND, "must match day-time format")
checkFail("5 1:12:20", HOUR, MICROSECOND, "Cannot support (interval")
+
+ // whitespaces
+ check("\t +5 12:40\t ", DAY, MINUTE, "5 days 12 hours 40 minutes")
+ checkFail("+5\t 12:40", DAY, MINUTE, "must match day-time format")
Review comment:
for multi-unit syntax, do we support `1 day \t 2 hours`?
----------------------------------------------------------------
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]