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 2022/02/18 03:52:00 UTC

[jira] [Commented] (SPARK-38247) Unify the output of df.explain and "explain " if plan is command

    [ https://issues.apache.org/jira/browse/SPARK-38247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17494357#comment-17494357 ] 

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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org