spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hyukjin Kwon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-19709) CSV datasource fails to read empty file
Date Fri, 24 Feb 2017 00:44:44 GMT

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

Hyukjin Kwon commented on SPARK-19709:
--------------------------------------

Please go ahead. (but I _personally_ recommend you open a PR in few days just to avoid potential
conflicts because, for example, if https://github.com/apache/spark/pull/16976 gets merged,
the code path will be changed rapidly).

> CSV datasource fails to read empty file
> ---------------------------------------
>
>                 Key: SPARK-19709
>                 URL: https://issues.apache.org/jira/browse/SPARK-19709
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.2.0
>            Reporter: Hyukjin Kwon
>            Priority: Minor
>
> I just {{touch a}} and then ran the codes below:
> {code}
> scala> spark.read.csv("a")
> java.util.NoSuchElementException: next on empty iterator
> 	at scala.collection.Iterator$$anon$2.next(Iterator.scala:39)
> 	at scala.collection.Iterator$$anon$2.next(Iterator.scala:37)
> 	at scala.collection.IndexedSeqLike$Elements.next(IndexedSeqLike.
> {code}
> It seems we should produce an empty dataframe consistently with `spark.read.json("a")`.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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


Mime
View raw message