Github user dongjoon-hyun commented on a diff in the pull request: https://github.com/apache/spark/pull/22263#discussion_r225605534 --- Diff: sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala --- @@ -288,6 +297,65 @@ class CachedTableSuite extends QueryTest with SQLTestUtils with SharedSQLContext } } + test("SQL interface support storageLevel(DISK_ONLY)") { + sql("CACHE TABLE testData OPTIONS('storageLevel' 'DISK_ONLY')") + assertCached(spark.table("testData")) + val rddId = rddIdOf("testData") + assert(isExpectStorageLevel(rddId, Disk)) + spark.catalog.uncacheTable("testData") + } + + test("SQL interface select from table support storageLevel(DISK_ONLY)") { + sql("CACHE TABLE testSelect OPTIONS('storageLevel' 'DISK_ONLY') SELECT * FROM testData") + assertCached(spark.table("testSelect")) + val rddId = rddIdOf("testSelect") + assert(isExpectStorageLevel(rddId, Disk)) + spark.catalog.uncacheTable("testSelect") --- End diff -- ditto.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org