[
https://issues.apache.org/jira/browse/SPARK-15174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15273805#comment-15273805
]
hujiayin edited comment on SPARK-15174 at 5/12/16 4:09 AM:
-----------------------------------------------------------
I could fix it.
was (Author: hujiayin):
@Ian Hellstrom, I think the issue is caused by "if
(groupingExpressions.isEmpty) { Statistics(sizeInBytes = 1) }" in
basicLogicOperators.scala. I could fix it for you.
> 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: [email protected]
For additional commands, e-mail: [email protected]