Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/21594#discussion_r197311907
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala ---
@@ -801,4 +800,67 @@ class CachedTableSuite extends QueryTest with
SQLTestUtils with SharedSQLContext
}
assert(cachedData.collect === Seq(1001))
}
+
+ test("SPARK-24596 Non-cascading Cache Invalidation - uncache temporary
view") {
+ withView("t1", "t2") {
+ sql("CACHE TABLE t1 AS SELECT * FROM testData WHERE key > 1")
+ sql("CACHE TABLE t2 as SELECT * FROM t1 WHERE value > 1")
+
+ assert(spark.catalog.isCached("t1"))
+ assert(spark.catalog.isCached("t2"))
+ sql("UNCACHE TABLE t1")
+ assert(!spark.catalog.isCached("t1"))
+ assert(spark.catalog.isCached("t2"))
+ }
+ }
+
+ test("SPARK-24596 Non-cascading Cache Invalidation - drop temporary
view") {
+ withView("t1", "t2") {
--- End diff --
ditto
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]