You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Tomas Hudik (Jira)" <ji...@apache.org> on 2021/04/04 11:33:00 UTC
[jira] [Updated] (SPARK-34953) inferSchema for type date
[ https://issues.apache.org/jira/browse/SPARK-34953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tomas Hudik updated SPARK-34953:
--------------------------------
Description:
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.
was:
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 contains `Date` type therefore reading a file to Spark should be able to infer `Date` type to a column.
> 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
> 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.
--
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