Is UNCACHE table a lazy operation in Spark SQL?

2020-04-21 05:47发布

The Apache Spark SQL operation CACHE table has an option so that it runs lazy. But what about UNCACHE table ? The documentation doesn't say anything if it is lazy or not. Will the table be dropped immediately from cache or will it be deferred until the next run of the garbage collection? If it is lazy, is there a way to find out, if my table is still cached or not?

1条回答
SAY GOODBYE
2楼-- · 2020-04-21 06:16

The default UNCACHE operation is non-blocking. If you use the DSL, you can call df.unpersist(true) on a dataframe/dataset to make the operation blocking.

查看更多
登录 后发表回答