spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yin Huai (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SPARK-6212) The EXPLAIN output of CTAS only shows the analyzed plan
Date Sat, 07 Mar 2015 01:25:38 GMT
Yin Huai created SPARK-6212:
-------------------------------

             Summary: The EXPLAIN output of CTAS only shows the analyzed plan
                 Key: SPARK-6212
                 URL: https://issues.apache.org/jira/browse/SPARK-6212
             Project: Spark
          Issue Type: Bug
    Affects Versions: 1.3.0
            Reporter: Yin Huai


When you try
{code}
sql("explain extended create table parquet2 as select * from parquet1").collect.foreach(println)
{code}
The output will be 
{code}
[== Parsed Logical Plan ==]
['CreateTableAsSelect None, parquet2, false, Some(TOK_CREATETABLE)]
[ 'Project [*]]
[  'UnresolvedRelation [parquet1], None]
[]
[== Analyzed Logical Plan ==]
[CreateTableAsSelect [Database:default, TableName: parquet2, InsertIntoHiveTable]]
[Project [str#44]]
[ Subquery parquet1]
[  Relation[str#44] ParquetRelation2(List(file:/user/hive/warehouse/parquet1),Map(serialization.format
-> 1, path -> file:/user/hive/warehouse/parquet1),Some(StructType(StructField(str,StringType,true))),None)]
[]
[]
[== Optimized Logical Plan ==]
[CreateTableAsSelect [Database:default, TableName: parquet2, InsertIntoHiveTable]]
[Project [str#44]]
[ Subquery parquet1]
[  Relation[str#44] ParquetRelation2(List(file:/user/hive/warehouse/parquet1),Map(serialization.format
-> 1, path -> file:/user/hive/warehouse/parquet1),Some(StructType(StructField(str,StringType,true))),None)]
[]
[]
[== Physical Plan ==]
[ExecutedCommand (CreateTableAsSelect [Database:default, TableName: parquet2, InsertIntoHiveTable]]
[Project [str#44]]
[ Subquery parquet1]
[  Relation[str#44] ParquetRelation2(List(file:/user/hive/warehouse/parquet1),Map(serialization.format
-> 1, path -> file:/user/hive/warehouse/parquet1),Some(StructType(StructField(str,StringType,true))),None)]
[)]
[]
[Code Generation: false]
[== RDD ==]
{code}

Query Plans of the SELECT clause shown in Optimized Plan and Physical Plan are actually analyzed
plan.



--
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


Mime
View raw message