You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xiao Li (JIRA)" <ji...@apache.org> on 2015/12/28 09:24:49 UTC
[jira] [Created] (SPARK-12536) Fix the Explain Outputs of Empty
LocalRelation and LocalTableScan
Xiao Li created SPARK-12536:
-------------------------------
Summary: Fix the Explain Outputs of Empty LocalRelation and LocalTableScan
Key: SPARK-12536
URL: https://issues.apache.org/jira/browse/SPARK-12536
Project: Spark
Issue Type: Improvement
Components: SQL
Affects Versions: 1.6.0
Reporter: Xiao Li
{code}
val df = Seq(1 -> "a").toDF("a", "b")
df.where("1 = 0").explain(true)
{code}
The filter Filter (1 = 0) generates an empty `LocalRelation`. In the current explain, the optimized and physical plans look wrong because Filter (1 = 0) is removed by the optimizer.
{code}
== Parsed Logical Plan ==
Filter (1 = 0)
+- Project [_1#0 AS a#2,_2#1 AS b#3]
+- LocalRelation [_1#0,_2#1], [[1,a]]
== Analyzed Logical Plan ==
a: int, b: string
Filter (1 = 0)
+- Project [_1#0 AS a#2,_2#1 AS b#3]
+- LocalRelation [_1#0,_2#1], [[1,a]]
== Optimized Logical Plan ==
LocalRelation [a#2,b#3]
== Physical Plan ==
LocalTableScan [a#2,b#3]
{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