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 2019/04/01 01:21:06 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #24249: [SPARK-27325][SQL] Add implicit encoders for LocalDate and Instant

HyukjinKwon commented on a change in pull request #24249: [SPARK-27325][SQL] Add implicit encoders for LocalDate and Instant
URL: https://github.com/apache/spark/pull/24249#discussion_r270696726
 
 

 ##########
 File path: sql/core/src/test/java/test/org/apache/spark/sql/JavaDatasetSuite.java
 ##########
 @@ -399,6 +401,16 @@ public void testPrimitiveEncoder() {
     Assert.assertEquals(data, ds.collectAsList());
   }
 
+  @Test
+  public void testLocalDateAndInstantEncoders() {
+    Encoder<Tuple2<LocalDate, Instant>> encoder =
+      Encoders.tuple(Encoders.LOCALDATE(), Encoders.INSTANT());
+    List<Tuple2<LocalDate, Instant>> data =
+            Arrays.asList(new Tuple2<>(LocalDate.ofEpochDay(0), Instant.ofEpochSecond(0)));
 
 Review comment:
   nit 2 spaces

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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