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

RDD remains cached after the table gets overridden by "CACHE TABLE"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • None
    • SQL
    • None

    Description

      val rdd = sc.parallelize((1 to 10).map(i => s"""{"a":$i, "b":"str${i}"}"""))
      sqlContext.jsonRDD(rdd).registerTempTable("jt")
      
      sqlContext.sql("CACHE TABLE foo AS SELECT * FROM jt")
      sqlContext.sql("CACHE TABLE foo AS SELECT a FROM jt")
      

      After the second CACHE TABLE command, the RDD for the first table still remains in the cache.

      Attachments

        Activity

          People

            Unassigned Unassigned
            yhuai Yin Huai
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: