[ https://issues.apache.org/jira/browse/SPARK-16355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-16355: ------------------------------------ Assignee: (was: Apache Spark) > 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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org