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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]