You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/11/17 16:22:26 UTC

[GitHub] [spark] awdavidson commented on a diff in pull request #38312: [SPARK-40819][SQL] Timestamp nanos behaviour regression

awdavidson commented on code in PR #38312:
URL: https://github.com/apache/spark/pull/38312#discussion_r1025412863


##########
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:
   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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org