[ 
https://issues.apache.org/jira/browse/SPARK-18491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15673599#comment-15673599
 ] 

Sean Owen commented on SPARK-18491:
-----------------------------------

You should be able to use Date, and later the java.time classes once Java 8 can 
be assumed, yes. That's basically what this is about, making sure those types 
in case classes are supported as date/time types?

For now I don't think this is a Spark problem, while it can't use Java 8 
classes. Even afterwards it wouldn't not support these types. It is up to your 
code to not mutate these types, or at least, that's not specific to these 
classes.

> Spark uses mutable classes for date/time types mapping
> ------------------------------------------------------
>
>                 Key: SPARK-18491
>                 URL: https://issues.apache.org/jira/browse/SPARK-18491
>             Project: Spark
>          Issue Type: Improvement
>            Reporter: Damian Momot
>            Priority: Minor
>
> TimestampType is mapped to java.sql.Timestamp
> DateType is mapped to java.sql.Date
> Those both java types are mutable and thus their usage is highly discourage, 
> especially in distributed computing which uses lazy, functional approach
> Mapping to immutable joda times should be enough for now (until scala 2.12 + 
> jdk8 java.time is available for spark)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to