dilipbiswal commented on a change in pull request #25532: 
[SPARK-28790][DOC][SQL]Document CACHE TABLE statement in SQL Reference
URL: https://github.com/apache/spark/pull/25532#discussion_r319743984
 
 

 ##########
 File path: docs/sql-ref-syntax-aux-cache-cache-table.md
 ##########
 @@ -19,4 +19,65 @@ license: |
   limitations under the License.
 ---
 
-**This page is under construction**
+### Description
+`CACHE TABLE` statement caches the table's contents with the given storage 
level. This reduces scanning of the original files in future queries.
+
+### Syntax
+{% highlight sql %}
+CACHE [ LAZY ] TABLE table_name
+    [ OPTIONS ( 'storageLevel' [ = ] value ) ] [ [ AS ] query ]
+{% endhighlight %}
+
+### Parameters
+<dl>
+  <dt><code><em>LAZY</em></code></dt>
+  <dd>Only cache the table when it is first used, instead of immediately.</dd>
+</dl>
+
+<dl>
+  <dt><code><em>table_name</em></code></dt>
+  <dd>The name of the table to be cached.</dd>
+</dl>
+
+<dl>
+  <dt><code><em>OPTIONS ( 'storageLevel' [ = ] value )</em></code></dt>
+  <dd>
+  <code>OPTIONS</code> clause with <code>storageLevel</code> key and value 
pair. If a key other than <code>storageLevel</code> is used, a WARN with 
message "org.apache.spark.sql.execution.command.CacheTableCommand: Invalid 
options: XXXX -> XXXX" will be issued. The valid options for 
<code>storageLevel</code> are:
 
 Review comment:
   @huaxingao Do we need to detail the exact warning message ? We could say "An 
warning is issued when .... event occurs" ?

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

Reply via email to