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] [Resolved] (SPARK-6212) The EXPLAIN output of CTAS only shows the analyzed plan
Date Sun, 09 Aug 2015 04:07:45 GMT

     [ https://issues.apache.org/jira/browse/SPARK-6212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Yin Huai resolved SPARK-6212.
-----------------------------
       Resolution: Fixed
    Fix Version/s: 1.5.0

Issue resolved by pull request 7986
[https://github.com/apache/spark/pull/7986]

> 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
>          Components: SQL
>    Affects Versions: 1.3.0
>            Reporter: Yin Huai
>            Assignee: Yijie Shen
>             Fix For: 1.5.0
>
>
> 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