You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "hujiayin (JIRA)" <ji...@apache.org> on 2016/05/12 07:59:13 UTC
[jira] [Issue Comment Deleted] (SPARK-15174) DataFrame does not
have correct number of rows after dropDuplicates
[ https://issues.apache.org/jira/browse/SPARK-15174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
hujiayin updated SPARK-15174:
-----------------------------
Comment: was deleted
(was: I could fix it.)
> DataFrame does not have correct number of rows after dropDuplicates
> -------------------------------------------------------------------
>
> Key: SPARK-15174
> URL: https://issues.apache.org/jira/browse/SPARK-15174
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 1.4.1
> Reporter: Ian Hellstrom
>
> If you read an empty file/folder with the {{SQLContext.read()}} function and call {{DataFrame.dropDuplicates()}}, the number of rows is incorrect.
> {code}
> val input = "hdfs:///some/empty/directory"
> val df1 = sqlContext.read.json(input)
> val df2 = sqlContext.read.json(input).dropDuplicates
> df1.count == 0 // true
> df1.rdd.isEmpty // true
> df2.count == 0 // false: it's actually reported as 1
> df2.rdd.isEmpty // false
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org