EnricoMi commented on code in PR #38312: URL: https://github.com/apache/spark/pull/38312#discussion_r1025407302
########## sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaSuite.scala: ########## @@ -1040,6 +1040,14 @@ class ParquetSchemaSuite extends ParquetSchemaTest { } } + test("SPARK-40819 - ability to read parquet file with TIMESTAMP(NANOS, true)") { + val testDataPath = getClass.getResource("/test-data/timestamp-nanos.parquet") + val data = spark.read.parquet(testDataPath.toString).select("birthday") + + assert(data.schema.fields.head.dataType == LongType) + assert(data.take(1).head.getAs[Long](0) == 1668537129000000000L) Review Comment: Shall we sort the read dataframe to be guarantee we compare the first row (Unless all rows have the same timestamp)? -- 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