Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21594#discussion_r197247925
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/CacheManager.scala ---
    @@ -105,24 +105,58 @@ class CacheManager extends Logging {
       }
     
       /**
    -   * Un-cache all the cache entries that refer to the given plan.
    +   * Un-cache the given plan or all the cache entries that refer to the 
given plan.
    +   * @param query     The [[Dataset]] to be un-cached.
    +   * @param cascade   If true, un-cache all the cache entries that refer 
to the given
    +   *                  [[Dataset]]; otherwise un-cache the given 
[[Dataset]] only.
    +   * @param blocking  Whether to block until all blocks are deleted.
        */
    -  def uncacheQuery(query: Dataset[_], blocking: Boolean = true): Unit = 
writeLock {
    -    uncacheQuery(query.sparkSession, query.logicalPlan, blocking)
    +  def uncacheQuery(query: Dataset[_],
    +    cascade: Boolean, blocking: Boolean = true): Unit = writeLock {
    +    uncacheQuery(query.sparkSession, query.logicalPlan, cascade, blocking)
       }
     
       /**
    -   * Un-cache all the cache entries that refer to the given plan.
    +   * Un-cache the given plan or all the cache entries that refer to the 
given plan.
    +   * @param spark     The Spark session.
    +   * @param plan      The plan to be un-cached.
    +   * @param cascade   If true, un-cache all the cache entries that refer 
to the given
    +   *                  plan; otherwise un-cache the given plan only.
    +   * @param blocking  Whether to block until all blocks are deleted.
        */
    -  def uncacheQuery(spark: SparkSession, plan: LogicalPlan, blocking: 
Boolean): Unit = writeLock {
    +  def uncacheQuery(spark: SparkSession, plan: LogicalPlan,
    +    cascade: Boolean, blocking: Boolean): Unit = writeLock {
    +    val condition: LogicalPlan => Boolean =
    --- End diff --
    
    `condition` -> `shouldUnCache`?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to