cloud-fan commented on a change in pull request #23913: [SPARK-27008][SQL]
Support java.time.LocalDate as an external type of DateType
URL: https://github.com/apache/spark/pull/23913#discussion_r261194750
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/JavaTypeInference.scala
##########
@@ -393,6 +397,14 @@ object JavaTypeInference {
inputObject :: Nil,
returnNullable = false)
+ case c if c == classOf[java.sql.Date] &&
SQLConf.get.datetimeJava8ApiEnabled =>
Review comment:
it's for dataset, so we shouldn't check the config here. If users want to
collect a `Dataset[LocalDate]`, Spark must return `LocalDate` no matter what
the config value is.
So here we should do
```
case c if c == classOf[LocalDate] =>
StaticInvoke...
```
----------------------------------------------------------------
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]