Terry Kim created SPARK-33786: --------------------------------- Summary: Cache's storage level is not respected when a table name is altered. Key: SPARK-33786 URL: https://issues.apache.org/jira/browse/SPARK-33786 Project: Spark Issue Type: Bug Components: SQL Affects Versions: 3.2.0 Reporter: Terry Kim
To repro: {code:java} Seq(1 -> "a").toDF("i", "j").write.parquet(path.getCanonicalPath) sql(s"CREATE TABLE old USING parquet LOCATION '${path.toURI}'") sql("CACHE TABLE old OPTIONS('storageLevel' 'MEMORY_ONLY')") val oldStorageLevel = getStorageLevel("old") sql("ALTER TABLE old RENAME TO new") val newStorageLevel = getStorageLevel("new") assert(oldStorageLevel === newStorageLevel) {code} The assert fails: Expected :StorageLevel(disk, memory, deserialized, 1 replicas) Actual :StorageLevel(memory, deserialized, 1 replicas) -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org