dilipbiswal commented on a change in pull request #23883: [SPARK-26982][SQL] 
Enhance describe framework to describe the output of a query.
URL: https://github.com/apache/spark/pull/23883#discussion_r261486772
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/inputs/describe-query.sql
 ##########
 @@ -0,0 +1,28 @@
+-- Test tables
+CREATE table  desc_temp1 (key int COMMENT 'column_comment', val string) USING 
PARQUET;
+CREATE table  desc_temp2 (key int, val string) USING PARQUET;
+CREATE table  desc_temp3 (key int, val string) USING PARQUET;
+
+-- Simple Describe query
+DESC SELECT key, key + 1 as plusone FROM desc_temp1;
+DESC QUERY SELECT * FROM desc_temp2;
+DESC SELECT key, COUNT(*) as count FROM desc_temp1 group by key;
+DESC SELECT 10.00D as col1;
+DESC QUERY SELECT key FROM desc_temp1 UNION ALL select CAST(1 AS DOUBLE);
+DESC QUERY VALUES(1.00D, 'hello') as tab1(col1, col2);
+
+
+-- Error cases.
+DESC WITH s AS (SELECT 'hello' as col1) SELECT * FROM s;
 
 Review comment:
   @dongjoon-hyun Yeah.. Wenchen suggested that we start with simple selects 
and then improve on it. I am planning to look into CTEs next. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]

Reply via email to