Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/22941#discussion_r230609046 --- Diff: sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala --- @@ -589,4 +590,33 @@ class InsertSuite extends DataSourceTest with SharedSQLContext { sql("INSERT INTO TABLE test_table SELECT 2, null") } } + + test("SPARK-25936 InsertIntoDataSourceCommand does not use Cached Data") { --- End diff -- You can move this test suite to CachedTableSuite.scala and use the helper functions to verify whether the cache is used. See the example. ``` spark.range(2).createTempView("test_view") spark.catalog.cacheTable("test_view") val rddId = rddIdOf("test_view") assert(!isMaterialized(rddId)) sql("INSERT INTO TABLE test_table SELECT * FROM test_view") assert(isMaterialized(rddId)) ```
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org