MaxGekk commented on issue #23811: [SPARK-26902][SQL] Support java.time.Instant 
as an external type of TimestampType
URL: https://github.com/apache/spark/pull/23811#issuecomment-466453964
 
 
   > is it ok to convert `TimestampType` from/to Java class while I might see 
discussions that it is not good to expose `TimestampType `?
   
   Actually we are not exposing `TimestampType ` here. In current 
implementation internal `TimestampType` is converted to `java.sql.Timestamp` 
(when you do collect() for example). Java 8 brought new set of time-related 
classes including `java.time.Instant` which directly reflects Spark's 
`TimestampType`. I want to just allow users import Spark's timestamp to a 
modern Java timestamp class to avoid any possible problems with 
`java.sql.Timestamp` - like hybrid calendar + default time zone used inside of 
`java.util.Date` in some places.

----------------------------------------------------------------
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