You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/02/25 00:51:14 UTC

[GitHub] dilipbiswal opened a new pull request #23883: [SPARK-26982][SQL] Enhance describe frame work to describe the output of a query.

dilipbiswal opened a new pull request #23883: [SPARK-26982][SQL] Enhance describe frame work to describe the output of a query.
URL: https://github.com/apache/spark/pull/23883
 
 
   ## What changes were proposed in this pull request?
   Currently we can use `df.printSchema` to discover the schema information for a query. We should have a way to describe the output schema of a query using SQL interface. 
   
    
   
   Example:
   
   DESCRIBE SELECT * FROM desc_table
   DESCRIBE QUERY SELECT * FROM desc_table
   ```SQL
   
   spark-sql> create table desc_table (c1 int comment 'c1-comment', c2 decimal comment 'c2-comment', c3 string);
   
   spark-sql> desc select * from desc_table;
   c1	int	        c1-comment
   c2	decimal(10,0)	c2-comment
   c3	string	        NULL
   
   ```
   ## How was this patch tested?
   Added a new test under SQLQueryTestSuite and SparkSqlParserSuite

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org