[ https://issues.apache.org/jira/browse/SPARK-38247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17494356#comment-17494356 ]
Apache Spark commented on SPARK-38247: -------------------------------------- User 'Yikf' has created a pull request for this issue: https://github.com/apache/spark/pull/35564 > Unify the output of df.explain and "explain " if plan is command > ---------------------------------------------------------------- > > Key: SPARK-38247 > URL: https://issues.apache.org/jira/browse/SPARK-38247 > Project: Spark > Issue Type: Improvement > Components: SQL > Affects Versions: 3.2.0 > Reporter: yikf > Priority: Minor > Fix For: 3.3.0 > > > This pr aims to unify the out of df.explain and "explain" sql if plan is a > command > * unify the out of df.explain and "explain" sql if plan is a command > * Make the output of explain unambiguous if plan is a command > > Lets say have a query like "show tables", we want to explain it > Before this pr: > {code:java} > == Parsed Logical Plan == > 'ShowTables [namespace#62, tableName#63, isTemporary#64] > +- 'UnresolvedNamespace== Analyzed Logical Plan == > namespace: string, tableName: string, isTemporary: boolean > ShowTablesCommand default, [namespace#62, tableName#63, isTemporary#64], > false== Optimized Logical Plan == > CommandResult [namespace#62, tableName#63, isTemporary#64], Execute > ShowTablesCommand, [[default,lt,false], [default,people,false], > [default,person,false], [default,rt,false], [default,t,false], > [default,t1,false], [default,t10086,false], [default,txtsource,false]] > +- ShowTablesCommand default, [namespace#62, tableName#63, > isTemporary#64], false== Physical Plan == > CommandResult [namespace#62, tableName#63, isTemporary#64] > +- Execute ShowTablesCommand > +- ShowTablesCommand default, [namespace#62, tableName#63, > isTemporary#64], false {code} > After this pr: > {code:java} > == Parsed Logical Plan == > 'ShowTables [namespace#0, tableName#1, isTemporary#2] > +- 'UnresolvedNamespace== Analyzed Logical Plan == > namespace: string, tableName: string, isTemporary: boolean > ShowTables [namespace#0, tableName#1, isTemporary#2] > +- ResolvedNamespace V2SessionCatalog(spark_catalog), [default]== Optimized > Logical Plan == > ShowTables [namespace#0, tableName#1, isTemporary#2] > +- ResolvedNamespace V2SessionCatalog(spark_catalog), [default]== Physical > Plan == > ShowTables [namespace#0, tableName#1, isTemporary#2], > V2SessionCatalog(spark_catalog), [default] {code} -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org