[
https://issues.apache.org/jira/browse/SPARK-1669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Cheng Lian updated SPARK-1669:
------------------------------
Description:
Calling {{cacheTable()}} on some table {{t}} multiple times causes table {{t}}
to be cached multiple times. This semantics is different from {{RDD.cache()}},
which is idempotent.
We can check whether a table is already cached by checking:
# whether the structure of the underlying logical plan of the table is matches
the pattern {{Subquery(\_, SparkLogicalPlan(inMem @
InMemoryColumnarTableScan(_, _)))}}
# whether {{inMem.cachedColumnBuffers.getStorageLevel.useMemory}} is true
was:
Calling {{cacheTable()}} on some table {{t} multiple times causes table {{t}}
to be cached multiple times. This semantics is different from {{RDD.cache()}},
which is idempotent.
We can check whether a table is already cached by checking:
# whether the structure of the underlying logical plan of the table is matches
the pattern {{Subquery(\_, SparkLogicalPlan(inMem @
InMemoryColumnarTableScan(_, _)))}}
# whether {{inMem.cachedColumnBuffers.getStorageLevel.useMemory}} is true
> SQLContext.cacheTable() should be idempotent
> --------------------------------------------
>
> Key: SPARK-1669
> URL: https://issues.apache.org/jira/browse/SPARK-1669
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 1.0.0
> Reporter: Cheng Lian
> Labels: cache, column
>
> Calling {{cacheTable()}} on some table {{t}} multiple times causes table
> {{t}} to be cached multiple times. This semantics is different from
> {{RDD.cache()}}, which is idempotent.
> We can check whether a table is already cached by checking:
> # whether the structure of the underlying logical plan of the table is
> matches the pattern {{Subquery(\_, SparkLogicalPlan(inMem @
> InMemoryColumnarTableScan(_, _)))}}
> # whether {{inMem.cachedColumnBuffers.getStorageLevel.useMemory}} is true
--
This message was sent by Atlassian JIRA
(v6.2#6252)