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

Alter table properties should invalidate cache

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.3, 3.1.2, 3.2.0, 3.3.0
    • 3.1.3, 3.0.4, 3.2.1, 3.3.0
    • SQL
    • None

    Description

      The table properties can change the behavior of wriing. e.g. the parquet table with `parquet.compression`.

      If you execute the following SQL, we will get the file with snappy compression rather than zstd.

      CREATE TABLE t (c int) STORED AS PARQUET;
      // cache table metadata
      SELECT * FROM t;
      ALTER TABLE t SET TBLPROPERTIES('parquet.compression'='zstd');
      INSERT INTO TABLE t values(1);
      

      So we should invalidate the table cache after alter table properties.

      Attachments

        Activity

          People

            ulysses XiDuo You
            ulysses XiDuo You
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: