Skip to content

Commit

Permalink
Doc: Add Hive DELETE ORPHAN-FILES example (#11896)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebyhr authored Jan 15, 2025
1 parent 978189c commit 101e650
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/docs/hive.md
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,15 @@ Enter a query to expire snapshots having the following timestamp: `2021-12-09 05
ALTER TABLE test_table EXECUTE expire_snapshots('2021-12-09 05:39:18.689000000');
```

### `DELETE ORPHAN-FILES`

Used to remove files which are not referenced in any metadata files of an Iceberg table and can thus be considered "orphaned".
The function is available with the following syntax:
```sql
ALTER TABLE table_a EXECUTE DELETE ORPHAN-FILES;
ALTER TABLE table_a EXECUTE DELETE ORPHAN-FILES OLDER THAN ('2021-12-09 05:39:18.689000000');
```

### Type compatibility

Hive and Iceberg support different set of types. Iceberg can perform type conversion automatically, but not for all
Expand Down

0 comments on commit 101e650

Please sign in to comment.