Description
The same works in Spark 3.0 but fails in Spark 3.2.0-SNAPSHOT (and 3.1.0 probably):
Spark 3.0:
Welcome to ____ __ / __/__ ___ _____/ /__ _\ \/ _ \/ _ `/ __/ '_/ /___/ .__/\_,_/_/ /_/\_\ version 3.0.1 /_/ scala> sql("CREATE TABLE tbl (col int)") res2: org.apache.spark.sql.DataFrame = [] scala> spark.catalog.isCached("tbl") res3: Boolean = false scala> sql("CACHE TABLE tbl") res4: org.apache.spark.sql.DataFrame = [] scala> spark.catalog.isCached("tbl") res5: Boolean = true
Spark master:
Welcome to ____ __ / __/__ ___ _____/ /__ _\ \/ _ \/ _ `/ __/ '_/ /___/ .__/\_,_/_/ /_/\_\ version 3.2.0-SNAPSHOT /_/ scala> sql("CREATE TABLE tbl (col int)") res1: org.apache.spark.sql.DataFrame = [] scala> spark.catalog.isCached("tbl") res2: Boolean = false scala> sql("CACHE TABLE tbl") res3: org.apache.spark.sql.DataFrame = [] scala> spark.catalog.isCached("tbl") res4: Boolean = false