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

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.0.2, 3.1.0
    • Component/s: SQL
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: