srowen 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_r270673967
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala
##########
@@ -1730,6 +1730,14 @@ class DatasetSuite extends QueryTest with
SharedSQLContext {
def assertExecutionId: UserDefinedFunction = udf(AssertExecutionId.apply _)
spark.range(10).select(assertExecutionId($"id")).localCheckpoint(true)
}
+
+ test("implicit encoder for LocalDate and Instant") {
+ val localDate = java.time.LocalDate.of(2019, 3, 30)
+ assert(spark.range(1).map { _ => localDate }.head == localDate)
Review comment:
Hm, I thought `==` would just trigger `.equals()` and so the scalatest macro
could only report "assertion failed". I guess it's smarter than I thought as it
can look at the content of the assertion and be smart. OK yeah leave that.
----------------------------------------------------------------
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]