File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
catalyst/src/test/scala/org/apache/spark/sql/catalyst/csv
core/src/test/scala/org/apache/spark/sql/execution/datasources/csv Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -377,7 +377,9 @@ class UnivocityParserSuite extends SparkFunSuite with SQLHelper {
377377 def checkDate (dataType : DataType ): Unit = {
378378 val timestampsOptions =
379379 new CSVOptions (Map (" inferDate" -> " true" , " timestampFormat" -> " dd/MM/yyyy HH:mm" ,
380- " timestampNTZFormat" -> " dd-MM-yyyy HH:mm" , " dateFormat" -> " dd_MM_yyyy" ),
380+ " timestampNTZFormat" -> " dd-MM-yyyy HH:mm" , " dateFormat" -> " dd_MM_yyyy" ,
381+ // Required for date string to be parsed as timestamp since it misses the time component
382+ " enableDateTimeParsingFallback" -> " true" ),
381383 false , DateTimeUtils .getZoneId(" -08:00" ).toString)
382384 // Use CSVOption ZoneId="-08:00" (PST) to test that Dates in TimestampNTZ column are always
383385 // converted to their equivalent UTC timestamp
Original file line number Diff line number Diff line change @@ -2797,6 +2797,7 @@ abstract class CSVSuite
27972797 " inferSchema" -> " true" ,
27982798 " timestampFormat" -> " yyyy-MM-dd'T'HH:mm:ss" ,
27992799 " dateFormat" -> " yyyy-MM-dd" ,
2800+ " enableDateTimeParsingFallback" -> " true" ,
28002801 " inferDate" -> " true" )
28012802 val options2 = Map (
28022803 " header" -> " true" ,
You can’t perform that action at this time.
0 commit comments