Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-33786

Cache's storage level is not respected when a table name is altered.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.2.0
    • 3.0.2, 3.1.0
    • SQL
    • None

    Description

      To repro:

              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)
      

      The assert fails:
      Expected :StorageLevel(disk, memory, deserialized, 1 replicas)
      Actual :StorageLevel(memory, deserialized, 1 replicas)

      Attachments

        Activity

          People

            imback82 Terry Kim
            imback82 Terry Kim
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: