spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacek Laskowski <ja...@japila.pl>
Subject Dataset.explain, ExplainCommand and sqlContext.executePlan twice?
Date Wed, 13 Apr 2016 23:43:36 GMT
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


Mime
View raw message