dongjoon-hyun commented on a change in pull request #24385: [SPARK-27480][SQL] Improve `EXPLAIN DESC QUERY` to show the input SQL statement URL: https://github.com/apache/spark/pull/24385#discussion_r277177203
########## File path: sql/core/src/test/resources/sql-tests/results/describe-query.sql.out ########## @@ -154,16 +154,46 @@ DESCRIBE -- !query 15 -DROP TABLE desc_temp1 +EXPLAIN DESC QUERY SELECT * FROM desc_temp2 WHERE key > 0 -- !query 15 schema -struct<> +struct<plan:string> -- !query 15 output - +== Physical Plan == +Execute DescribeQueryCommand + +- DescribeQueryCommand SELECT * FROM desc_temp2 WHERE key > 0 -- !query 16 -DROP TABLE desc_temp2 +EXPLAIN EXTENDED DESC WITH s AS (SELECT 'hello' as col1) SELECT * FROM s -- !query 16 schema -struct<> +struct<plan:string> -- !query 16 output +== Parsed Logical Plan == +DescribeQueryCommand WITH s AS (SELECT 'hello' as col1) SELECT * FROM s + +== Analyzed Logical Plan == +col_name: string, data_type: string, comment: string +DescribeQueryCommand WITH s AS (SELECT 'hello' as col1) SELECT * FROM s + +== Optimized Logical Plan == +DescribeQueryCommand WITH s AS (SELECT 'hello' as col1) SELECT * FROM s + +== Physical Plan == +Execute DescribeQueryCommand + +- DescribeQueryCommand WITH s AS (SELECT 'hello' as col1) SELECT * FROM s Review comment: +1 for the reasoning, @dilipbiswal . Thanks. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
