You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2021/05/15 17:47:00 UTC

[jira] [Assigned] (SPARK-34953) inferSchema for type date

     [ https://issues.apache.org/jira/browse/SPARK-34953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Apache Spark reassigned SPARK-34953:
------------------------------------

    Assignee:     (was: Apache Spark)

> inferSchema for type date 
> --------------------------
>
>                 Key: SPARK-34953
>                 URL: https://issues.apache.org/jira/browse/SPARK-34953
>             Project: Spark
>          Issue Type: New Feature
>          Components: Spark Core, SQL
>    Affects Versions: 3.1.1
>            Reporter: Tomas Hudik
>            Priority: Minor
>
> Reading a csv file with `option({color:#6a8759}"inferSchema"{color}{color:#cc7832},{color}{color:#6a8759}"true"{color})` doesnt work with `date` type.  E.g. [https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/CSVInferSchema.scala#L101:L119] - can process only `Timestamp` not a `Date`
>  
> Datasets often contain `Date` type therefore reading a file to Spark should be able to infer `Date` type to a column.
> For now, only work-arounds (e.g. [https://stackoverflow.com/a/46595057/1408096] , or [https://stackoverflow.com/questions/66935214/spark-reading-csv-with-specified-date-format] ) are possible/



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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