Github user maropu commented on a diff in the pull request:
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/CacheManager.scala ---
    @@ -119,26 +119,60 @@ class CacheManager extends Logging {
         while (it.hasNext) {
           val cd =
           if (cd.plan.find(_.sameResult(plan)).isDefined) {
    -        cd.cachedRepresentation.cachedColumnBuffers.unpersist(blocking)
    +        cd.cachedRepresentation.clearCache(blocking)
    +  /**
    +   * Materialize the cache that refers to the given physical plan.
    --- End diff --
    The current approach of this pr is; `cache()` just registers an entry 
without building a `RDD` in `CacheManager` and then `InMemoryTableScanExec` 
re-registers an entry to build (materialize) a `RDD` in `CacheManager`. So, I 
added this function for  `InMemoryTableScanExec`  to re-register these entries 
in  `CacheManager`. But, I don't think this is the best, so I'd like to have 
any suggestion.


To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to