Skip to content

Commit 2deac74

Browse files
luogankunmarmbrus
authored andcommitted
[SPARK-4930][SQL][DOCS]Update SQL programming guide, CACHE TABLE is eager
`CACHE TABLE tbl` is now __eager__ by default not __lazy__ Author: luogankun <[email protected]> Closes #3773 from luogankun/SPARK-4930 and squashes the following commits: cc17b7d [luogankun] [SPARK-4930][SQL][DOCS]Update SQL programming guide, add CACHE [LAZY] TABLE [AS SELECT] ... bffe0e8 [luogankun] [SPARK-4930][SQL][DOCS]Update SQL programming guide, CACHE TABLE tbl is eager
1 parent f7a41a0 commit 2deac74

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

docs/sql-programming-guide.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,12 +1007,11 @@ let user control table caching explicitly:
10071007
CACHE TABLE logs_last_month;
10081008
UNCACHE TABLE logs_last_month;
10091009

1010-
**NOTE:** `CACHE TABLE tbl` is lazy, similar to `.cache` on an RDD. This command only marks `tbl` to ensure that
1011-
partitions are cached when calculated but doesn't actually cache it until a query that touches `tbl` is executed.
1012-
To force the table to be cached, you may simply count the table immediately after executing `CACHE TABLE`:
1010+
**NOTE:** `CACHE TABLE tbl` is now __eager__ by default not __lazy__. Don’t need to trigger cache materialization manually anymore.
10131011

1014-
CACHE TABLE logs_last_month;
1015-
SELECT COUNT(1) FROM logs_last_month;
1012+
Spark SQL newly introduced a statement to let user control table caching whether or not lazy since Spark 1.2.0:
1013+
1014+
CACHE [LAZY] TABLE [AS SELECT] ...
10161015

10171016
Several caching related features are not supported yet:
10181017

0 commit comments

Comments
 (0)