You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2015/08/06 03:15:04 UTC
[jira] [Commented] (SPARK-6212) The EXPLAIN output of CTAS only
shows the analyzed plan
[ https://issues.apache.org/jira/browse/SPARK-6212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14659292#comment-14659292 ]
Apache Spark commented on SPARK-6212:
-------------------------------------
User 'chenghao-intel' has created a pull request for this issue:
https://github.com/apache/spark/pull/7980
> 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
>
> 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