You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2016/07/04 18:11:11 UTC

[jira] [Commented] (SPARK-16355) Incorrect Statistics when Queries Containing LIMIT/TABLESAMPLE 0

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

Apache Spark commented on SPARK-16355:
--------------------------------------

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

> Incorrect Statistics when Queries Containing LIMIT/TABLESAMPLE 0
> ----------------------------------------------------------------
>
>                 Key: SPARK-16355
>                 URL: https://issues.apache.org/jira/browse/SPARK-16355
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.0.0
>            Reporter: Xiao Li
>
> When a query containing LIMIT/TABLESAMPLE 0, the statistics could be zero. Results are correct but it could cause a huge performance regression. For example,
> {noformat}
>       Seq(("one", 1), ("two", 2), ("three", 3), ("four", 4)).toDF("k", "v")
>         .createOrReplaceTempView("test")
>       val df1 = spark.table("test")
>       val df2 = spark.table("test").limit(0)
>       val df = df1.join(df2, Seq("k"), "left")
> {noformat}
> The statistics of both {{df}} and {{df2}} are zero. The statistics values should never be zero; otherwise `sizeInBytes` of `BinaryNode` will also be zero (product of children). 



--
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