You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spark.apache.org by Jacek Laskowski <ja...@japila.pl> on 2016/04/14 01:43:36 UTC

Dataset.explain, ExplainCommand and sqlContext.executePlan twice?

Hi,

While reviewing explain(extended: Boolean) -
https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala#L408
- I've noticed that:

1. It first creates ExplainCommand that does
sqlContext.executePlan(logicalPlan) in run
https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/command/commands.scala#L247

2. And then calls sqlContext.executePlan(explain)
https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala#L410

Why are there two sqlContext.executePlan's? It appears that we calls
the former to execute the latter (?) I'm confused. Please explain :)
I'd appreciate.

Pozdrawiam,
Jacek Laskowski
----
https://medium.com/@jaceklaskowski/
Mastering Apache Spark http://bit.ly/mastering-apache-spark
Follow me at https://twitter.com/jaceklaskowski

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@spark.apache.org
For additional commands, e-mail: dev-help@spark.apache.org