Hi,
may I know which version of spark you are using, in 2.2 I tried with
below query in spark-shell for viewing the logical plan and it's working
fine
spark.sql("explain extended select * from table1")
The above query you can use for seeing logical plan.
Thanks,
Sujith
On Thu, 7 Sep 2017 at 11:03 AM, ChenJun Zou <[email protected]> wrote:
> Hi,
>
> when I use spark-shell to get the logical plan of sql, an error occurs
>
> scala> spark.sessionState
> <console>:30: error: lazy value sessionState in class SparkSession cannot
> be accessed in org.apache.spark.sql.SparkSession
> spark.sessionState
> ^
>
> But if I use spark-submit to access the "sessionState" variable, It's OK.
>
> Is there a way to access it in spark-shell?
>