File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -456,12 +456,18 @@ class DateTimeUtilsSuite extends SparkFunSuite with Matchers {
456456 }
457457 }
458458
459- test(" trailing characters while converting string to timestamp" ) {
459+ test(" trailing colon while converting string to timestamp" ) {
460460 val s = UTF8String .fromString(" 2019-10-31T10:59:23Z:::" )
461461 val time = DateTimeUtils .stringToTimestamp(s, defaultZoneId)
462462 assert(time == None )
463463 }
464464
465+ test(" trailing space while converting string to timestamp" ) {
466+ val s = UTF8String .fromString(" 2019-10-31T10:59:23ZZ " )
467+ val time = DateTimeUtils .stringToTimestamp(s, defaultZoneId)
468+ assert(time == None )
469+ }
470+
465471 test(" truncTimestamp" ) {
466472 def testTrunc (
467473 level : Int ,
You can’t perform that action at this time.
0 commit comments