You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/07/13 00:13:49 UTC

[GitHub] [iceberg] kbendick commented on a change in pull request #2757: Add support for reading/writing timestamps without timezone.

kbendick commented on a change in pull request #2757:
URL: https://github.com/apache/iceberg/pull/2757#discussion_r668337753



##########
File path: spark/src/test/java/org/apache/iceberg/spark/data/AvroDataTest.java
##########
@@ -185,4 +188,18 @@ public void testMixedTypes() throws IOException {
 
     writeAndValidate(schema);
   }
+
+  @Test
+  public void testTimestampWithoutZone() throws IOException {
+    Option<SparkSession> sparkSession = SparkSession.getActiveSession();
+    if (sparkSession.isDefined()) {
+      sparkSession.get().conf().set(SparkUtil.HANDLE_TIMESTAMP_WITHOUT_TIMEZONE, "true");
+    }

Review comment:
       This is in `AvroDataTest`, but there is some code for handling additional Spark SQL conf options here that might be something worth copying:
   
   https://github.com/apache/iceberg/blob/25eaebacbd1e250d2d884b49fc753a23b6aa6eaf/spark/src/test/java/org/apache/iceberg/spark/SparkTestBase.java#L171-L206
   
   Additionally, it might be good to unset this property after its use (so the configuration doesn't get mixed up with other tests now or in the future).
   
   




-- 
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: issues-unsubscribe@iceberg.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org