Repository navigation
Make iceberg_delete_data_on_drop use query context - #126110
Conversation
|
Workflow [PR], commit [4b7aae7] Summary: ✅
AI ReviewSummary
Missing context / blind spots
Final VerdictStatus: ✅ Approve |
|
The scope is creeping :). Turns out deleting data is not super safely implemented, because we're supposed to traverse the metadata tree, not delete the whole directory contents. Now, it is blocked, but it's not super obvious how to fix at this point. I will switch this PR to just fixing the query context. |
Keep only the context fix: `DROP TABLE` in a `DataLakeCatalog` database now reads `iceberg_delete_data_on_drop` from the query. Revert the storage-side purge changes. They turned a dead code path into a live one that deleted every object under the queried directory, which is unsafe for a directory shared by several tables. The storage-side purge is left as it was and tracked separately. Review: #126110 Co-Authored-By: Claude Fable 5.1 <[email protected]>
iceberg_delete_data_on_drop not deleting the table dataiceberg_delete_data_on_drop use query context
Related: #124481
Summary
SET iceberg_delete_data_on_drop = 1had no effect onDROP TABLEin aDataLakeCatalogdatabase. The setting was read from the global context only. Such a drop runs inside the query, so the query settings apply. A table of anAtomicdatabase is still dropped by a background thread without a query context, and keeps reading the global context.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
DROP TABLEin aDataLakeCatalogdatabase now respects the query-level settingiceberg_delete_data_on_drop.Workflow [PR]
Sync PR [sync-upstream/pr/126110]
Version info
26.11.1.107-master(included in26.11and later)