diff options
author | Cheng Lian <lian.cs.zju@gmail.com> | 2014-06-23 13:24:33 -0700 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2014-06-23 13:24:33 -0700 |
commit | a4bc442ca2c35444de8a33376b6f27c6c2a9003d (patch) | |
tree | 8c4b63eb33d10d5165ba13d66c0cd81f7a60e307 /bin/spark-class | |
parent | 853a2b951d4c7f6c6c37f53b465b3c7b77691b7c (diff) | |
download | spark-a4bc442ca2c35444de8a33376b6f27c6c2a9003d.tar.gz spark-a4bc442ca2c35444de8a33376b6f27c6c2a9003d.tar.bz2 spark-a4bc442ca2c35444de8a33376b6f27c6c2a9003d.zip |
[SPARK-1669][SQL] Made cacheTable idempotent
JIRA issue: [SPARK-1669](https://issues.apache.org/jira/browse/SPARK-1669)
Caching the same table multiple times should end up with only 1 in-memory columnar representation of this table.
Before:
```
scala> loadTestTable("src")
...
scala> cacheTable("src")
...
scala> cacheTable("src")
...
scala> table("src")
...
== Query Plan ==
InMemoryColumnarTableScan [key#2,value#3], (InMemoryRelation [key#2,value#3], false, (InMemoryColumnarTableScan [key#2,value#3], (InMemoryRelation [key#2,value#3], false, (HiveTableScan [key#2,value#3], (MetastoreRelation default, src, None), None))))
```
After:
```
scala> loadTestTable("src")
...
scala> cacheTable("src")
...
scala> cacheTable("src")
...
scala> table("src")
...
== Query Plan ==
InMemoryColumnarTableScan [key#2,value#3], (InMemoryRelation [key#2,value#3], false, (HiveTableScan [key#2,value#3], (MetastoreRelation default, src, None), None))
```
Author: Cheng Lian <lian.cs.zju@gmail.com>
Closes #1183 from liancheng/spark-1669 and squashes the following commits:
68f8a20 [Cheng Lian] Removed an unused import
51bae90 [Cheng Lian] Made cacheTable idempotent
Diffstat (limited to 'bin/spark-class')
0 files changed, 0 insertions, 0 deletions