Github user maropu commented on a diff in the pull request: https://github.com/apache/spark/pull/21018#discussion_r183288666 --- Diff: sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala --- @@ -794,4 +794,17 @@ class CachedTableSuite extends QueryTest with SQLTestUtils with SharedSQLContext } } } + + private def isMaterialized(df: DataFrame): Boolean = { + val nodes = df.queryExecution.executedPlan.collect { case c: InMemoryTableScanExec => c } + assert(nodes.nonEmpty, "DataFrame is not cached\n" + df.queryExecution.analyzed) + nodes.forall(_.relation.cacheBuilder._cachedColumnBuffers != null) + } + + test("SPARK-23880 table cache should be lazy and don't trigger any jobs") { --- End diff -- ok
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org