srowen 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_r316331815
 
 

 ##########
 File path: docs/sql-ref-syntax-aux-cache-cache-table.md
 ##########
 @@ -19,4 +19,34 @@ license: |
   limitations under the License.
 ---
 
-**This page is under construction**
+### Description
+CACHE TABLE statement can be used to cache the contents of the table in memory 
using the RDD cache. This enables subsequent queries to avoid scanning the 
original files as much as possible.
+
+### Syntax
+{% highlight sql %}
+CACHE [LAZY] TABLE [db_name.]table_name
+  [OPTIONS (table_property_list)] [[AS] query]
+
+table_property_list:
+    : (table_property_key1 [[=]table_property_value1], table_property_key2 
[[=]table_property_value2], ...)
+
+{% endhighlight %}
+
+### Example
+{% highlight sql %}
+CACHE TABLE testCache OPTIONS ('storageLevel' 'DISK_ONLY') SELECT * FROM 
testData
+{% endhighlight %}
+
+### Parameters
+
+#### ***LAZY***:
+Cache the table lazily instead of eagerly scanning the entire table.
 
 Review comment:
   Lazy here means "the first time it's used" rather than immediately right? 
that might be worth clarifying.

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