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/08/21 18:09:50 UTC

[GitHub] [spark] srowen commented on a change in pull request #25529: [SPARK-28804][DOC] Document DESCRIBE QUERY in SQL Reference

srowen commented on a change in pull request #25529: [SPARK-28804][DOC] Document DESCRIBE QUERY in SQL Reference
URL: https://github.com/apache/spark/pull/25529#discussion_r316327470
 
 

 ##########
 File path: docs/sql-ref-syntax-aux-describe-query.md
 ##########
 @@ -19,4 +19,34 @@ license: |
   limitations under the License.
 ---
 
-**This page is under construction**
+### Description
+The DESCRIBE QUERY statement is used to return the metadata of output
+of a query. 
+
+### Syntax
+{% highlight sql %}
+{DESC | DESCRIBE} [QUERY] query 
+
+query:= {cte | select-query | inline-table | TABLE table-name}
+{% endhighlight %}
+**Note**
+* For detailed syntax of query parameter please refer to [select-statement](sql-ref-syntax-qry-select.html)
+  and the examples below.
+* DESC and DESCRIBE are interchangeble and mean the same thing.
+
+### Examples
+{% highlight sql %}
+-- Returns column name, column type and comment info for a simple select query
+DESCRIBE QUERY select * customer;
+-- Returns column name, column type and comment info for a inline table.
+DESC QUERY VALUES(1.00D, 'hello') as test_tab(c1, c2);
 
 Review comment:
   I don't know SQL well enough to know: you can write 1.00D as a literal? the "D" works?

----------------------------------------------------------------
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:
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