Github user ueshin commented on a diff in the pull request:
https://github.com/apache/spark/pull/13596#discussion_r66698444
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/CacheManager.scala ---
@@ -105,7 +105,7 @@ private[sql] class CacheManager extends Logging {
val planToCache = query.queryExecution.analyzed
val dataIndex = cachedData.indexWhere(cd =>
planToCache.sameResult(cd.plan))
require(dataIndex >= 0, s"Table $query is not cached.")
- cachedData(dataIndex).cachedRepresentation.uncache(blocking)
+
cachedData(dataIndex).cachedRepresentation.cachedColumnBuffers.unpersist(blocking)
--- End diff --
Yes, that's right.
But I noticed that the original `InMemoryRelation` instance to be set
`_cachedColumnBuffers` to `null` is not the same instance that will be executed
by the `DataFrame` because it was copied by `withOutput` when `CacheManager`
replace the logical plan for the `DataFrame`.
So we don't need to set it to null and the original one will be collected
by GC soon.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]