RESTORE deletes part of the delta table's history

Kassandra_
New Contributor

Having a delta table with the history of 15 versions (see screenshot). After running the command:

RESTORE TABLE hive_metastore.my_schema.my_table TO VERSION AS OF 6;
And then running DESCRIBE HISTORY (see screenshot) it seems that a new version (RESTORE) was added, but the first 10 versions are gone. I checked this with more tables and the same thing happened. Why is that? Is this expected behaviour?

MariuszK
Valued Contributor III

it's not. I haven't observed this behavior. According to the delta lake documentation "Using the restore command resets the table’s content to an earlier version, but doesn’t remove any data. It simply updates the transaction log to indicate that certain files should not be read. "