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

Need to update Partition URI after renaming table in InMemoryCatalog

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.3.0
    • 3.3.0, 3.2.2
    • SQL

    Description

      After renaming a partitioned table, select from the new table from InMemoryCatalog will get an empty result.

      The following checkAnswer will fail as the result is empty.

      sql(s"create table foo(i int, j int) using PARQUET partitioned by (j)")
      sql("insert into table foo partition(j=2) values (1)")
      sql(s"alter table foo rename to bar")
      checkAnswer(spark.table("bar"), Row(1, 2)) 

      To fix the bug, we need to update Partition URI after renaming a table in InMemoryCatalog

       

      Attachments

        Activity

          People

            Gengliang.Wang Gengliang Wang
            Gengliang.Wang Gengliang Wang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: