sadikovi commented on a change in pull request #34596: URL: https://github.com/apache/spark/pull/34596#discussion_r759656496
########## File path: sql/core/src/test/scala/org/apache/spark/sql/CsvFunctionsSuite.scala ########## @@ -368,4 +368,15 @@ class CsvFunctionsSuite extends QueryTest with SharedSparkSession { .selectExpr("value.a") checkAnswer(fromCsvDF, Row(localDT)) } + + test("SPARK-37326: Handle incorrectly formatted timestamp_ntz values in from_csv") { + val fromCsvDF = Seq("2021-08-12T15:16:23.000+11:00").toDF("csv") + .select( + from_csv( + $"csv", + StructType(StructField("a", TimestampNTZType) :: Nil), + Map.empty[String, String]) as "value") + .selectExpr("value.a") + checkAnswer(fromCsvDF, Row(null)) Review comment: There is a test right above that verifies the happy path for those functions. I only added a new test because it was missing from the original patch. -- 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. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org