spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-25199) InferSchema "all Strings" if one of many CSVs is empty
Date Wed, 22 Aug 2018 18:57:00 GMT

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

Apache Spark commented on SPARK-25199:
--------------------------------------

User 'yunjzhang' has created a pull request for this issue:
https://github.com/apache/spark/pull/22177

> InferSchema "all Strings" if one of many CSVs is empty
> ------------------------------------------------------
>
>                 Key: SPARK-25199
>                 URL: https://issues.apache.org/jira/browse/SPARK-25199
>             Project: Spark
>          Issue Type: Bug
>          Components: Input/Output
>    Affects Versions: 2.2.1
>         Environment: I discovered this on AWS Glue, which uses Spark 2.2.1
>            Reporter: Neil McGuigan
>            Priority: Minor
>              Labels: newbie
>
> Spark can load multiple CSV files in one read:
> df = spark.read.format("csv").option("header", "true").option("inferSchema", "true").load("/*.csv")
> However, if one of these files is empty (though it has a header), Spark will set all
column types to "String"
> Spark should skip a file for inference if it contains no (non-header) rows



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message