I have renamed a table, however on trying to write to it (or delete from it) I get the following error:
`java.io.FileNotFoundException: No such file or directory: s3a://.../hive/warehouse/testing.db/renamed_table_name/_delta_log/00000000000000000002.json`
My cluster version is 10.4 LTS
The following python snippet can be used to recreate the issue:
```
DB_NAME = 'testing'
def rename(old_table_name, new_table_name):
spark.conf.set("spark.databricks.delta.alterTable.rename.enabledOnAWS", "true")
spark.sql(f"ALTER TABLE {DB_NAME}.{old_table_name} RENAME TO {DB_NAME}.{new_table_name}")
def overwrite(table_name, source_df):
(source_df.write
.mode("overwrite")
.format("delta")
.saveAsTable(f"{DB_NAME}.{table_name}")
)
def get_df():
data = [
("Name1", "Surname1", 12345),
("Name2", "Surname2", 67890),
]
return spark.createDataFrame(data)
sparkDf = get_df()
# Create table
overwrite('table_name', sparkDf)
# Rename table
rename('table_name', 'renamed_table_name')
# Try to write to renamed table (or delete from). Failure happens here
overwrite('renamed_table_name', sparkDf)
```
Any help would be appreciated