Table ID not preserved using CREATE OR REPLACE TABLE

shanisolomonron
New Contributor III

The When to replace a table documentation states that using CREATE OR REPLACE TABLE should preserve the table’s identity:

Table contents are replaced, but the table identity is maintained.

However, in my recent test the table ID changed after running this command. Is this expected behavior?

For example, the transaction log shows:

  • Version 0:

    {"metaData":{"id":"6a085d18-3aef-4c4c-890b-fb4a6f9d6888", ...}}
  • Version 2: (post command)

    {"metaData":{"id":"e3f5d990-2c03-483e-8cd3-a772d5d87e93", ...}}

Should CREATE OR REPLACE TABLE ever generate a new table ID, or is this a bug?