cloud-fan commented on a change in pull request #23358: [SPARK-26424][SQL] Use 
java.time API in date/timestamp expressions
URL: https://github.com/apache/spark/pull/23358#discussion_r243794114
 
 

 ##########
 File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/util/DateFormatterSuite.scala
 ##########
 @@ -89,4 +89,10 @@ class DateFormatterSuite extends SparkFunSuite with 
SQLHelper {
       }
     }
   }
+
+  test("parsing date without explicit day") {
+    val formatter = DateFormatter("yyyy MMM", Locale.US)
+    val daysSinceEpoch = formatter.parse("2018 Dec")
+    assert(daysSinceEpoch === 17866)
 
 Review comment:
   would be better to show the expected result in a human-readable way, e.g. 
`Date.of("2018-12-01").getDays`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]

Reply via email to