[ https://issues.apache.org/jira/browse/SPARK-3058?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Cheng Hao updated SPARK-3058: ----------------------------- Description: Currently, it's no difference when run the command "EXPLAIN" w or w/o "EXTENDED" keywords, this patch will show more details of the query plan when "EXTENDED" keyword provided. {panel:title=EXPLAIN with EXTENDED} explain extended select key as a1, value as a2 from src where key=1; == Parsed Logical Plan == Project ['key AS a1#3,'value AS a2#4] Filter ('key = 1) UnresolvedRelation None, src, None == Analyzed Logical Plan == Project [key#8 AS a1#3,value#9 AS a2#4] Filter (CAST(key#8, DoubleType) = CAST(1, DoubleType)) MetastoreRelation default, src, None == Optimized Logical Plan == Project [key#8 AS a1#3,value#9 AS a2#4] Filter (CAST(key#8, DoubleType) = 1.0) MetastoreRelation default, src, None == Physical Plan == Project [key#8 AS a1#3,value#9 AS a2#4] Filter (CAST(key#8, DoubleType) = 1.0) HiveTableScan [key#8,value#9], (MetastoreRelation default, src, None), None Code Generation: false == RDD == (2) MappedRDD[14] at map at HiveContext.scala:350 MapPartitionsRDD[13] at mapPartitions at basicOperators.scala:42 MapPartitionsRDD[12] at mapPartitions at basicOperators.scala:57 MapPartitionsRDD[11] at mapPartitions at TableReader.scala:112 MappedRDD[10] at map at TableReader.scala:240 HadoopRDD[9] at HadoopRDD at TableReader.scala:230 {panel} was: Currently, it's no difference when run the command "EXPLAIN" w or w/o "EXTENDED" keywords, this patch will provide more details when "EXTENDED" keyword added. {panel:title=EXPLAIN with EXTENDED} explain extended select key as a1, value as a2 from src where key=1; == Parsed Logical Plan == Project ['key AS a1#3,'value AS a2#4] Filter ('key = 1) UnresolvedRelation None, src, None == Analyzed Logical Plan == Project [key#8 AS a1#3,value#9 AS a2#4] Filter (CAST(key#8, DoubleType) = CAST(1, DoubleType)) MetastoreRelation default, src, None == Optimized Logical Plan == Project [key#8 AS a1#3,value#9 AS a2#4] Filter (CAST(key#8, DoubleType) = 1.0) MetastoreRelation default, src, None == Physical Plan == Project [key#8 AS a1#3,value#9 AS a2#4] Filter (CAST(key#8, DoubleType) = 1.0) HiveTableScan [key#8,value#9], (MetastoreRelation default, src, None), None Code Generation: false == RDD == (2) MappedRDD[14] at map at HiveContext.scala:350 MapPartitionsRDD[13] at mapPartitions at basicOperators.scala:42 MapPartitionsRDD[12] at mapPartitions at basicOperators.scala:57 MapPartitionsRDD[11] at mapPartitions at TableReader.scala:112 MappedRDD[10] at map at TableReader.scala:240 HadoopRDD[9] at HadoopRDD at TableReader.scala:230 {panel} > Support EXTENDED for EXPLAIN command > ------------------------------------ > > Key: SPARK-3058 > URL: https://issues.apache.org/jira/browse/SPARK-3058 > Project: Spark > Issue Type: Improvement > Components: SQL > Reporter: Cheng Hao > Assignee: Cheng Hao > Priority: Minor > > Currently, it's no difference when run the command "EXPLAIN" w or w/o > "EXTENDED" keywords, this patch will show more details of the query plan when > "EXTENDED" keyword provided. > {panel:title=EXPLAIN with EXTENDED} > explain extended select key as a1, value as a2 from src where key=1; > == Parsed Logical Plan == > Project ['key AS a1#3,'value AS a2#4] > Filter ('key = 1) > UnresolvedRelation None, src, None > == Analyzed Logical Plan == > Project [key#8 AS a1#3,value#9 AS a2#4] > Filter (CAST(key#8, DoubleType) = CAST(1, DoubleType)) > MetastoreRelation default, src, None > == Optimized Logical Plan == > Project [key#8 AS a1#3,value#9 AS a2#4] > Filter (CAST(key#8, DoubleType) = 1.0) > MetastoreRelation default, src, None > == Physical Plan == > Project [key#8 AS a1#3,value#9 AS a2#4] > Filter (CAST(key#8, DoubleType) = 1.0) > HiveTableScan [key#8,value#9], (MetastoreRelation default, src, None), None > Code Generation: false > == RDD == > (2) MappedRDD[14] at map at HiveContext.scala:350 > MapPartitionsRDD[13] at mapPartitions at basicOperators.scala:42 > MapPartitionsRDD[12] at mapPartitions at basicOperators.scala:57 > MapPartitionsRDD[11] at mapPartitions at TableReader.scala:112 > MappedRDD[10] at map at TableReader.scala:240 > HadoopRDD[9] at HadoopRDD at TableReader.scala:230 > {panel} -- This message was sent by Atlassian JIRA (v6.2#6252) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org